diff --git a/src/infra/redis/testing/stream-message-reply.factory.ts b/src/infra/redis/testing/stream-message-reply.factory.ts index 8fad4681..d9262b66 100644 --- a/src/infra/redis/testing/stream-message-reply.factory.ts +++ b/src/infra/redis/testing/stream-message-reply.factory.ts @@ -5,10 +5,9 @@ export const streamMessageReplyFactory = Factory.define(({ s return { id: `redis-id-${sequence}`, message: { - key: `redis-key-${sequence}-1`, m: Buffer.from(`message-${sequence}-2`), - docName: `doc-name-${sequence}`, - compact: Buffer.from(`compact-${sequence}`), + docName: `prefix:room:room:docid-${sequence.toString()}`, + compact: Buffer.from(`prefix:room:room:docid-${sequence.toString()}`), }, }; }); diff --git a/src/infra/redis/testing/x-auto-claim-response.factory.ts b/src/infra/redis/testing/x-auto-claim-response.factory.ts index 48eb45dc..a5458e70 100644 --- a/src/infra/redis/testing/x-auto-claim-response.factory.ts +++ b/src/infra/redis/testing/x-auto-claim-response.factory.ts @@ -1,5 +1,5 @@ import { Factory } from 'fishery'; -import { StreamMessageReply, XAutoClaimResponse } from '../interfaces/index.js'; +import { XAutoClaimResponse } from '../interfaces/index.js'; export const xAutoClaimResponseFactory = Factory.define(({ sequence }) => { return { @@ -7,15 +7,3 @@ export const xAutoClaimResponseFactory = Factory.define(({ s messages: [], }; }); - -export const streamMessageReplyFactory = Factory.define(({ sequence }) => { - return { - id: sequence.toString(), - message: { - key: sequence.toString(), - m: Buffer.from(sequence.toString()), - docName: `prefix:room:room:docid-${sequence.toString()}`, - compact: Buffer.from(`prefix:room:room:docid-${sequence.toString()}`), - }, - }; -}); diff --git a/src/modules/worker/worker.service.spec.ts b/src/modules/worker/worker.service.spec.ts index 72e4b285..5ab31cd8 100644 --- a/src/modules/worker/worker.service.spec.ts +++ b/src/modules/worker/worker.service.spec.ts @@ -4,10 +4,8 @@ import { Awareness } from 'y-protocols/awareness'; import { Doc } from 'yjs'; import { Logger } from '../../infra/logger/logger.js'; import { RedisAdapter, StreamMessageReply } from '../../infra/redis/interfaces/index.js'; -import { - streamMessageReplyFactory, - xAutoClaimResponseFactory, -} from '../../infra/redis/testing/x-auto-claim-response.factory.js'; +import { streamMessageReplyFactory } from '../../infra/redis/testing/stream-message-reply.factory.js'; +import { xAutoClaimResponseFactory } from '../../infra/redis/testing/x-auto-claim-response.factory.js'; import { StorageService } from '../../infra/storage/storage.service.js'; import { yRedisDocFactory } from '../../infra/y-redis/testing/y-redis-doc.factory.js'; import { YRedisClient } from '../../infra/y-redis/y-redis.client.js';