-
Notifications
You must be signed in to change notification settings - Fork 948
Resolve Performance test failures and add unit tests for proto3 data transport format #2503
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
So I tried this out and I don't think any of these 3 tests actually run, as written. When a test is async you have to handle it with a
done()
or by returning a promise, or else Mocha will just go on to the next test and not wait for the async part to finish, and count it as passed. I think as the code currently stands, you can put anything in the callback and it will pass.If you wanted it to reach the
expect
line you'd wantOr instead of using
done()
, return a promise.I'm able to get around the described problem (doing a real time offset before tests begin, which allows all imported instances of
ccHandler
to reach the initialsetTimeout
callback ofprocessQueue
) with this block, which runs before all tests.You don't need to run this before each test, just all tests, because all instances of the top level call to
processQueue
runs before any tests which I don't think is what you expect or want, so, can I suggest not callingprocessQueue
automatically at the top level ofcc_service.ts
but instead providing an init function to run it, whichperf_logger.ts
can call at the top. This way each test can call the init on its own time and not have to do any kind of setTimeout workaround.Also another warning, if this code worked as intended (using
done()
or a promise return to pause the async test until timeout ends and theexpect
runs), thewaitForFirstTimeout
would wait on the real time clock, and I think it's set to 100 seconds (10 * 10 * 1000) and on the real time clock that would be bad.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.
Thank you Christina for the detailed feedback and tried with the testing! I have updated the logic in
cc_service.ts
to provide an init function and updated tests to include fake timer insidedescribe()
. Since this test update is separated from feature branch merge in this PR (fireperf-update-log-format
), I created master branch PR for this #2506. Thank you!