-
Notifications
You must be signed in to change notification settings - Fork 78
Support get_type_description service via parameter #1162
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
Changes from 2 commits
bb3794d
3bd5939
5120e28
f678f10
aa2a857
341f936
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -19,6 +19,7 @@ const assertUtils = require('./utils.js'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const DistroUtils = require('../lib/distro.js'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const rclnodejs = require('../index.js'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const TypeDescriptionService = require('../lib/type_description_service.js'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const { exec } = require('child_process'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
describe('type description service test suite', function () { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
this.timeout(60 * 1000); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -73,4 +74,26 @@ describe('type description service test suite', function () { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
done(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
it('Test type description service configured by parameter', function (done) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
exec( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'ros2 param list /test_type_description_service', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(error, stdout, stderr) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (error || stderr) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
done( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
new Error( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'Test type description service configured by parameter failed.' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+88
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Currently the test fails on any
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (stdout.includes('start_type_description_service')) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
done(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test case may hang if 'start_type_description_service' is not found in stdout because there is no else branch to call done() with an error. Consider adding an else branch that terminates the test with an appropriate error message.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
done( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
new Error("'start_type_description_service' not found in stdout.") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+85
to
+103
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shelling out to
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}); |
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.
[nitpick] Consider extracting the parameter name 'start_type_description_service' into a top-level constant to avoid duplication and reduce risk of typos.
Copilot uses AI. Check for mistakes.