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(test): Streaming mock fixes. Mock cleanup. #549

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

kinyoklion
Copy link
Member

No description provided.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File was redundant.

@@ -16,6 +16,10 @@ export const setupMockStreamingProcessor = (
errorTimeoutSeconds: number = 0,
initTimeoutMs: number = 0,
) => {
let initTimeoutHandle: any;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mock stream was not closing its timer handles so they interfered with other tests.

@@ -72,7 +72,8 @@ describe('sdk-client object', () => {
.mockReturnValue('/stream/path');
});

afterEach(() => {
afterEach(async () => {
await ldc.close();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close the client so timers and things stop.

@kinyoklion kinyoklion marked this pull request as ready for review August 16, 2024 22:39
@kinyoklion kinyoklion requested a review from a team as a code owner August 16, 2024 22:39
@kinyoklion kinyoklion merged commit ab05253 into main Aug 19, 2024
20 checks passed
@kinyoklion kinyoklion deleted the rlamb/more-mock-fixes branch August 19, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants