Skip to content

Commit

Permalink
fix: try timeout sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Aug 9, 2024
1 parent a9b29a4 commit d4a0e51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/token-queue/image-cache.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ENV } from '../../src/env';
import { processImageCache } from '../../src/token-processor/images/image-cache';
import { startTestResponseServer, startTimeoutServer } from '../helpers';
import { sleep, startTestResponseServer, startTimeoutServer } from '../helpers';
import {
HttpError,
MetadataTimeoutError,
Expand All @@ -27,6 +27,7 @@ describe('Image cache', () => {
processImageCache('http://127.0.0.1:9999/', contract, tokenNumber)
).rejects.toThrow(MetadataTimeoutError);
} finally {
await sleep(200);
const serverDone = waiter();
server.close(() => serverDone.finish());
await serverDone;
Expand Down

0 comments on commit d4a0e51

Please sign in to comment.