Skip to content

Commit 3e76830

Browse files
committed
Feature/hmaint 235 (#76)
* HMAINT-235: Handle case where build ID has 4 integers * HMAINT-235: Fix unrelated commented out test (cherry picked from commit 2ae9702)
1 parent 1ae1ba7 commit 3e76830

2 files changed

Lines changed: 24 additions & 13 deletions

File tree

test/nodejs/test_rticonnextdds_connector.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ describe('Connector Tests', function () {
9393
await connector.close()
9494
})
9595

96-
// it('Should be possible to create a Connector with participant qos', async function () {
97-
// const xmlProfile = path.join(__dirname, '/../xml/TestConnector.xml')
98-
// const connector = new rti.Connector(
99-
// 'MyParticipantLibrary::ConnectorWithParticipantQos',
100-
// xmlProfile)
101-
// expect(connector).to.exist
102-
// expect(connector).to.be.instanceOf(rti.Connector)
103-
// await connector.close()
104-
// })
96+
it('Should be possible to create a Connector with participant qos', async function () {
97+
const xmlProfile = path.join(__dirname, '/../xml/TestConnector.xml')
98+
const connector = new rti.Connector(
99+
'MyParticipantLibrary::ConnectorWithParticipantQos',
100+
xmlProfile)
101+
expect(connector).to.exist
102+
expect(connector).to.be.instanceOf(rti.Connector)
103+
await connector.close()
104+
})
105105

106106
it('is possible to obtain the current version of Connector', function () {
107107
const version = rti.Connector.getVersion()
@@ -112,17 +112,18 @@ describe('Connector Tests', function () {
112112
// - the build ID of core.1.0
113113
// - the build ID of dds_c.1.0
114114
// - the build ID of lua_binding.1.0
115+
// Each build ID has either 3 or 4 version digits.
115116
// Expect "RTI Connector for JavaScript, version X.X.X"
116117
let regex = /RTI Connector for JavaScript, version ([0-9][.]){2}[0-9]/
117118
expect(regex.test(version)).deep.equals(true)
118119
// Expect "NDDSCORE_BUILD_<VERSION>_<DATE>T<TIMESTAMP>Z"
119-
regex = /.*NDDSCORE_BUILD_([0-9][.]){2}[0-9]_[0-9]{8}T[0-9]{6}Z/
120+
regex = /.*NDDSCORE_BUILD_([0-9][.]){2,3}[0-9]_[0-9]{8}T[0-9]{6}Z/
120121
expect(regex.test(version)).deep.equals(true)
121122
// Expect "NDDSC_BUILD_<VERSION>_<DATE>T<TIMESTAMP>Z"
122-
regex = /.*NDDSC_BUILD_([0-9][.]){2}[0-9]_[0-9]{8}T[0-9]{6}Z/
123+
regex = /.*NDDSC_BUILD_([0-9][.]){2,3}[0-9]_[0-9]{8}T[0-9]{6}Z/
123124
expect(regex.test(version)).deep.equals(true)
124125
// Expect "RTICONNECTOR_BUILD_<VERSION>_<DATE>T<TIMESTAMP>Z"
125-
regex = /.*RTICONNECTOR_BUILD_([0-9][.]){2}[0-9]_[0-9]{8}T[0-9]{6}Z/
126+
regex = /.*RTICONNECTOR_BUILD_([0-9][.]){2,3}[0-9]_[0-9]{8}T[0-9]{6}Z/
126127
expect(regex.test(version)).deep.equals(true)
127128
})
128129

test/xml/TestConnector.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,17 @@ This code contains trade secrets of Real-Time Innovations, Inc.
309309
<!-- Test for CON-214 -->
310310
<domain_participant name="ConnectorWithParticipantQos"
311311
domain_ref="MyDomainLibrary::MyDomain">
312-
<domain_participant_qos/>
312+
<domain_participant_qos>
313+
<transport_builtin>
314+
<mask>UDPV4 | SHMEM</mask>
315+
</transport_builtin>
316+
<database>
317+
<shutdown_cleanup_period>
318+
<sec>0</sec>
319+
<nanosec>100000000</nanosec>
320+
</shutdown_cleanup_period>
321+
</database>
322+
</domain_participant_qos>
313323
</domain_participant>
314324
</domain_participant_library>
315325
</dds>

0 commit comments

Comments
 (0)