Skip to content

Conversation

minggangw
Copy link
Member

@minggangw minggangw commented Jun 17, 2025

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

@coveralls
Copy link

coveralls commented Jun 18, 2025

Coverage Status

coverage: 84.731%. remained the same
when pulling 85b6027 on minggangw:fix-flakiness
into 8da31c9 on RobotWebTools:develop.

@minggangw minggangw requested a review from Copilot June 18, 2025 02:36
@minggangw minggangw changed the title Fix flakiness Fix test-type-description-service.js flakiness Jun 18, 2025
Copilot

This comment was marked as outdated.

@minggangw minggangw requested a review from Copilot June 18, 2025 02:55
Copy link

@Copilot Copilot AI left a 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);
Copy link

Copilot AI Jun 18, 2025

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.

Suggested change
}, 2000);
}, POLLING_INTERVAL_MS);

Copilot uses AI. Check for mistakes.

@minggangw minggangw merged commit f631d46 into RobotWebTools:develop Jun 18, 2025
19 checks passed
minggangw added a commit that referenced this pull request Jun 18, 2025
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
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.

Fix flakiness of test-type-description-service.js

2 participants