Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"devDependencies": {
"@mercuriusjs/federation": "^5.0.0",
"@mercuriusjs/gateway": "^5.0.0",
"@sinonjs/fake-timers": "^11.2.2",
"@sinonjs/fake-timers": "^15.1.0",
"@types/node": "^25.0.2",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^5.30.3",
"@typescript-eslint/parser": "^5.30.3",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"autocannon": "^8.0.0",
"borp": "^0.21.0",
"concurrently": "^9.0.0",
Expand All @@ -49,9 +49,9 @@
"pre-commit": "^1.2.2",
"snazzy": "^9.0.0",
"standard": "^17.1.0",
"tsd": "^0.32.0",
"tsd": "^0.33.0",
"typescript": "^5.4.2",
"wait-on": "^8.0.0"
"wait-on": "^9.0.3"
},
"dependencies": {
"@fastify/error": "^4.0.0",
Expand Down
10 changes: 6 additions & 4 deletions test/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,14 @@ describe('gateway refresh', () => {
messageService.graphql.replaceSchema(buildFederationSchema(newSchema))
messageService.graphql.defineResolvers(resolvers)

await clock.tickAsync(2000)
// Tick past the polling interval and allow async operations to settle
await clock.tickAsync(3000)

// We need the event loop to actually spin twice to
// We need the event loop to actually spin multiple times to
// be able to propagate the change
await immediate()
await immediate()
for (let i = 0; i < 10; i++) {
await immediate()
}

{
const res = await gateway.inject({
Expand Down
Loading