Skip to content

Commit 422e902

Browse files
Merge pull request #113 from XavierGeerinck/master
Resolve duplicate test firings due to id overlaps
2 parents 922d2f3 + fac4352 commit 422e902

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/e2e/actors.http.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ describe('http/actors', () => {
225225

226226
describe('reminders', () => {
227227
it('should be able to unregister a reminder', async () => {
228-
const actorId = `my-actor`;
228+
const actorId = `my-actor-for-reminder-unregistering`;
229229
const reminderId = `my-reminder`;
230230

231231
// Activate our actor
@@ -261,7 +261,7 @@ describe('http/actors', () => {
261261
});
262262

263263
it('should fire a reminder correctly', async () => {
264-
const actorId = `my-actor-counter-id-${(new Date()).getTime()}}`;
264+
const actorId = `my-actor-counter-id-for-reminder-firing`;
265265
const reminderId = `my-reminder`;
266266

267267
// Activate our actor
@@ -290,7 +290,7 @@ describe('http/actors', () => {
290290
});
291291

292292
it('should fire a reminder but with a warning if it\'s not implemented correctly', async () => {
293-
const actorId = `my-actor-counter-id-${(new Date()).getTime()}}`;
293+
const actorId = `my-actor-counter-id-for-reminder-implementation-check`;
294294
const reminderId = `my-reminder-2`;
295295

296296
// Create spy object
@@ -315,7 +315,7 @@ describe('http/actors', () => {
315315
// The method receiveReminder on AbstractActor should be called at least once
316316
// this will state the not implemented function
317317
expect(spy.mock.calls[0].length).toBe(1);
318-
expect(spy.mock.calls[0][0]).toEqual(`{"error":"ACTOR_METHOD_NOT_IMPLEMENTED","errorMsg":"A reminder was created for the actor with id: my-actor-counter-id-1633266216796%7D but the method 'receiveReminder' was not implemented"}`);
318+
expect(spy.mock.calls[0][0]).toEqual(`{"error":"ACTOR_METHOD_NOT_IMPLEMENTED","errorMsg":"A reminder was created for the actor with id: ${actorId} but the method 'receiveReminder' was not implemented"}`);
319319

320320
// Unregister the reminder
321321
await client.actor.reminderDelete(DemoActorReminder2Impl.name, actorId, reminderId);

0 commit comments

Comments
 (0)