Skip to content

Conversation

minggangw
Copy link
Member

@minggangw minggangw commented May 27, 2025

This PR addresses the flakiness in the test-type-description-service.js test suite by updating the asynchronous initialization pattern.

  • Converts beforeEach to an async function, awaiting rclnodejs.init()
  • Creates and spins a test node in beforeEach instead of within individual tests

Fix: #1154

@minggangw minggangw requested a review from Copilot May 27, 2025 05:14
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 the flakiness in the test-type-description-service.js test suite by updating the asynchronous initialization pattern.

  • Converts beforeEach to an async function, awaiting rclnodejs.init()
  • Creates and spins a test node in beforeEach instead of within individual tests

await rclnodejs.init();
const nodeName = 'test_type_description_service';
node = rclnodejs.createNode(nodeName);
rclnodejs.spin(node);
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

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

Ensure that the test node created in beforeEach is properly shut down or cleaned up in afterEach to prevent potential resource leaks or interference between tests.

Copilot uses AI. Check for mistakes.

@coveralls
Copy link

Coverage Status

coverage: 84.823%. remained the same
when pulling bd86619 on minggangw:fix-1154
into f2dd1f0 on RobotWebTools:develop.

@minggangw minggangw merged commit 17a1e85 into RobotWebTools:develop May 27, 2025
18 checks passed
minggangw added a commit that referenced this pull request Jun 6, 2025
This PR addresses the flakiness in the test-type-description-service.js test suite by updating the asynchronous initialization pattern.  
- Converts beforeEach to an async function, awaiting rclnodejs.init()  
- Creates and spins a test node in beforeEach instead of within individual tests

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