-
Notifications
You must be signed in to change notification settings - Fork 15
Feature/con 188 #18
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
Feature/con 188 #18
Changes from 1 commit
e2bc8f3
30eae97
0891c10
63e7072
8db8abb
a6f7145
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 |
|---|---|---|
|
|
@@ -70,7 +70,7 @@ describe('Data access tests with a pre-populated input', function () { | |
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| // Fail the test | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
|
Collaborator
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. why is the error captured and rethrown only to log a message? Just let it fail without a try/catch
Contributor
Author
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. You can't do that, the test will not fail, the test will pass but mocha will detect
So it sounds like in future versions of Node.js they will make it fail the process, but at the moment that is not the case. The common solution online is to return the promise to mocha (which has promise handling, and can therefore detect the failure). But since our tests usually have multiple Promises within them (i.e., multiple If you like I can investigate this option |
||
| } | ||
| // Write data on the the output | ||
| output.instance.setFromJson(testJsonObject) | ||
|
|
@@ -81,7 +81,7 @@ describe('Data access tests with a pre-populated input', function () { | |
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| // Fail the test | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| // Take the data on the input so that we can access it from the test | ||
| prepopulatedInput.take() | ||
|
|
@@ -388,7 +388,7 @@ describe('Tests with a testOutput and testInput', () => { | |
| expect(newMatches).to.deep.equals(1) | ||
| } catch (err) { | ||
| console.log('Caught err ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| }) | ||
|
|
||
|
|
@@ -512,7 +512,7 @@ describe('Tests with a testOutput and testInput', () => { | |
| await testInput.wait(testExpectSuccessTimeout) | ||
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| testInput.take() | ||
| const received = testInput.samples.get(0).get('my_int_sequence') | ||
|
|
@@ -531,7 +531,7 @@ describe('Tests with a testOutput and testInput', () => { | |
| await testInput.wait(testExpectSuccessTimeout) | ||
| } catch (err) { | ||
| console.log('Caught error: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| testInput.take() | ||
| const received = testInput.samples.get(0).get('my_point_sequence') | ||
|
|
@@ -545,7 +545,7 @@ describe('Tests with a testOutput and testInput', () => { | |
| await testInput.wait(testExpectSuccessTimeout) | ||
| } catch (err) { | ||
| console.log('Caught error: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| testInput.take() | ||
| const sample = testInput.samples.get(0) | ||
|
|
@@ -1017,14 +1017,14 @@ describe('Tests with two readers and two writers', () => { | |
| expect(newMatches).to.deep.equals(1) | ||
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| try { | ||
| const newMatches = await testOutput2.waitForSubscriptions(testExpectSuccessTimeout) | ||
| expect(newMatches).to.deep.equals(1) | ||
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| }) | ||
|
|
||
|
|
@@ -1041,7 +1041,7 @@ describe('Tests with two readers and two writers', () => { | |
| try { | ||
| await connector.wait(testExpectFailureTimeout) | ||
| console.log('Expected connector.wait to timeout but it did not') | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } catch (err) { | ||
| expect(err).to.be.an.instanceof(rti.TimeoutError) | ||
| } | ||
|
|
@@ -1051,7 +1051,7 @@ describe('Tests with two readers and two writers', () => { | |
| try { | ||
| await testInput1.wait(testExpectFailureTimeout) | ||
| console.log('Expected testInput1.wait to timeout but it did not') | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } catch (err) { | ||
| expect(err).to.be.an.instanceof(rti.TimeoutError) | ||
| } | ||
|
|
@@ -1061,7 +1061,7 @@ describe('Tests with two readers and two writers', () => { | |
| try { | ||
| await testInput2.wait(testExpectFailureTimeout) | ||
| console.log('Expected testInput2.wait to timeout but it did not') | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } catch (err) { | ||
| expect(err).to.be.an.instanceof(rti.TimeoutError) | ||
| } | ||
|
|
@@ -1073,7 +1073,7 @@ describe('Tests with two readers and two writers', () => { | |
| await connector.wait(testExpectSuccessTimeout) | ||
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| }) | ||
|
|
||
|
|
@@ -1083,7 +1083,7 @@ describe('Tests with two readers and two writers', () => { | |
| await testInput1.wait(testExpectSuccessTimeout) | ||
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| }) | ||
|
|
||
|
|
@@ -1092,7 +1092,7 @@ describe('Tests with two readers and two writers', () => { | |
| try { | ||
| await testInput2.wait(testExpectFailureTimeout) | ||
| console.log('Expected testInput2.wait to timeout but it did not') | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } catch (err) { | ||
| expect(err).to.be.an.instanceof(rti.TimeoutError) | ||
| } | ||
|
|
@@ -1104,7 +1104,7 @@ describe('Tests with two readers and two writers', () => { | |
| await connector.wait(testExpectSuccessTimeout) | ||
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| }) | ||
|
|
||
|
|
@@ -1114,7 +1114,7 @@ describe('Tests with two readers and two writers', () => { | |
| await testInput2.wait(testExpectSuccessTimeout) | ||
| } catch (err) { | ||
| console.log('Caught err: ' + err) | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } | ||
| }) | ||
|
|
||
|
|
@@ -1123,7 +1123,7 @@ describe('Tests with two readers and two writers', () => { | |
| try { | ||
| await testInput1.wait(testExpectFailureTimeout) | ||
| console.log('Expected testInput2.wait to timeout but it did not') | ||
| expect(true).to.deep.equals(false) | ||
| throw(err) | ||
| } catch (err) { | ||
| expect(err).to.be.an.instanceof(rti.TimeoutError) | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.