-
Notifications
You must be signed in to change notification settings - Fork 78
Fix test-type-description-service.js flakiness #1169
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses test flakiness in the type description service tests by refining the asynchronous wait logic and cleaning up unused imports. Key changes include:
- Removal of the unused assertUtils import.
- Transition from a promise chain to async/await for waiting on the service and handling the response.
- Introduction of an interval-based polling mechanism to send the request and clear the timer upon response.
Comments suppressed due to low confidence (1)
test/test-type-description-service.js:65
- Consider adding a comment to explain the rationale for reducing the waitForService timeout from 60 seconds to 5 seconds, to aid future maintainability.
const result = await client.waitForService(5000);
resolve(); | ||
}); | ||
}); | ||
}, 2000); |
Copilot
AI
Jun 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider extracting the polling interval (2000ms) into a constant to enhance clarity and simplify future adjustments.
}, 2000); | |
}, POLLING_INTERVAL_MS); |
Copilot uses AI. Check for mistakes.
This PR addresses test flakiness in the type description service tests by refining the asynchronous wait logic and cleaning up unused imports. Key changes include: - Removal of the unused assertUtils import. - Transition from a promise chain to async/await for waiting on the service and handling the response. - Introduction of an interval-based polling mechanism to send the request and clear the timer upon response. Fix: #1154
This PR addresses test flakiness in the type description service tests by refining the asynchronous wait logic and cleaning up unused imports. Key changes include:
Fix: #1154