Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reduce the runtime of CLI unit tests by 2 minutes #32988

Merged
merged 5 commits into from
Jan 20, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,13 @@ describe.each([HotswapMode.FALL_BACK, HotswapMode.HOTSWAP_ONLY])('%p mode', (hot
);

silentTest(
'updateFunction() API fails if it recieves 7 failed attempts in a row - this is a long running test',
'updateFunction() API fails if it recieves 7 failed attempts in a row',
async () => {
// Ignore the wait times that the SDK tries to impose and always set timers for 1 ms
const realSetTimeout = setTimeout;
const mockSetTimeout = jest.spyOn(global, 'setTimeout').mockImplementation((fn) => {
return realSetTimeout(fn, 1);
});

// GIVEN
mockAppSyncClient
Expand Down Expand Up @@ -1123,6 +1128,8 @@ describe.each([HotswapMode.FALL_BACK, HotswapMode.HOTSWAP_ONLY])('%p mode', (hot
requestMappingTemplate: '## original request template',
responseMappingTemplate: '## new response template',
});

mockSetTimeout.mockRestore();
},
320000,
);
Expand Down
Loading