Skip to content

Commit 355f2ac

Browse files
committed
Address comments
1 parent ab7a0ed commit 355f2ac

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

lib/node_options.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,16 @@ class NodeOptions {
109109
}
110110

111111
/**
112-
* Get the startTypeDescriptionService option.
112+
* Get the startTypeDescriptionService option, only available for ROS2 > Humble.
113113
* Default value = true;
114-
* @returns {boolean} -
114+
* @returns {boolean} - true if the type description service is enabled.
115115
*/
116116
get startTypeDescriptionService() {
117117
return this._startTypeDescriptionService;
118118
}
119119

120120
/**
121-
* Set startTypeDescriptionService.
121+
* Set startTypeDescriptionService, only available for ROS2 > Humble
122122
* @param {boolean} willStartTypeDescriptionService
123123
*/
124124
set startTypeDescriptionService(willStartTypeDescriptionService) {

test/test-extra-destroy-methods.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,9 @@ describe('Node extra destroy methods testing', function () {
8989
it('destroyService()', function () {
9090
var node = rclnodejs.createNode('node4');
9191
const AddTwoInts = 'example_interfaces/srv/AddTwoInts';
92+
const initialServiceCount = node._services.length;
9293
var service = node.createService(AddTwoInts, 'add_two_ints', () => {});
93-
if (DistroUtils.getDistroId() <= DistroUtils.getDistroId('humble')) {
94-
assert.deepStrictEqual(node._services.length, 7);
95-
} else {
96-
assert.deepStrictEqual(node._services.length, 8);
97-
}
98-
94+
assert.deepStrictEqual(node._services.length, initialServiceCount + 1);
9995
assertThrowsError(
10096
function () {
10197
node.destroyService('service');
@@ -106,11 +102,7 @@ describe('Node extra destroy methods testing', function () {
106102
);
107103

108104
node.destroyService(service);
109-
if (DistroUtils.getDistroId() <= DistroUtils.getDistroId('humble')) {
110-
assert.deepStrictEqual(node._services.length, 6);
111-
} else {
112-
assert.deepStrictEqual(node._services.length, 7);
113-
}
105+
assert.deepStrictEqual(node._services.length, initialServiceCount);
114106
});
115107

116108
it('destroyTimer()', function () {

0 commit comments

Comments
 (0)