Skip to content

Commit b823a2d

Browse files
authored
Fix flakiness of test-type-description-service.js (#1367)
This PR fixes flakiness in the test-type-description-service.js test file by preventing multiple calls to the `done()` callback in asynchronous tests. The root cause was that after calling `done()` with an error, the callback would continue executing and potentially call `done()` again, causing test failures. **Changes:** - Added `return` statements after `done()` calls in error handling blocks to prevent continued execution - Enhanced error messages to include actual error and stderr details for better debugging Fix: #1366
1 parent 6d2582f commit b823a2d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/test-type-description-service.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ describe('type description service test suite', function () {
9191
if (error || stderr) {
9292
done(
9393
new Error(
94-
'Test type description service configured by parameter failed.'
94+
`Test type description service configured by parameter failed. Error: ${error}, Stderr: ${stderr}`
9595
)
9696
);
97+
return;
9798
}
9899
if (stdout.includes('start_type_description_service')) {
99100
done();
@@ -113,9 +114,10 @@ describe('type description service test suite', function () {
113114
if (error || stderr) {
114115
done(
115116
new Error(
116-
'Test type description service configured by parameter failed.'
117+
`Test type description service configured by parameter failed. Error: ${error}, Stderr: ${stderr}`
117118
)
118119
);
120+
return;
119121
}
120122
if (stdout.includes('Boolean value is: True')) {
121123
done();

0 commit comments

Comments
 (0)