-
Notifications
You must be signed in to change notification settings - Fork 892
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
[Tests] fix JUnit Reporter test #1338
[Tests] fix JUnit Reporter test #1338
Conversation
Interesting flakiness in the test. After the jest upgrade, our tests got more performant. The JUnit Report integ test was actually expecting `anything` for a field `time`. This `time` was calculated on elapsed time to the `0.00x` value anything faster would actually be undefined and at that point `anything` fails because `anything` cannot be undefined. tl;dr: This test became flakey because our tests now run too fast. Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
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.
LGTM !! Thanks for the changes.
it('fails', (done) => { | ||
setTimeout(() => { | ||
done(); | ||
}, 200); |
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.
will this timeout be enough ?
Interesting - did this just pop up? Was it only failing locally? We didn't have any failing integration tests in #1301. |
It would fail like 1 out 4 times locally and fail less frequently in github, probably saw it only twice in the CI but enough for me to check it out locally. |
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Fix unit tests of ExecutionContract throwing AbortError Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Fix unit tests of ExecutionContract throwing AbortError Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Fix unit tests of ExecutionContract throwing AbortError Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (#1306) * Fix JUnit Reporter test (#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (#1442) * Add code coverage reporting (#1478) * Add release build verification workflow (#1502) * Add Windows CI to the workflow (#2966) * Add retrying flaky jest tests (#2967) * Record functional test artifacts in case of failure (#3190) * Increase timeout waiting for the exiting of an optimizer worker (#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <miki@amazon.com>
…ject#3299) * Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <amoo_miki@yahoo.com>
…ject#3299) * Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <amoo_miki@yahoo.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (opensearch-project#1306) * Fix JUnit Reporter test (opensearch-project#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442) * Add code coverage reporting (opensearch-project#1478) * Add release build verification workflow (opensearch-project#1502) * Add Windows CI to the workflow (opensearch-project#2966) * Add retrying flaky jest tests (opensearch-project#2967) * Record functional test artifacts in case of failure (opensearch-project#3190) * Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Backport PR: opensearch-project#3299 Signed-off-by: Miki <miki@amazon.com>
* Run GitHub workflow unit tests in band (#1306) * Fix JUnit Reporter test (#1338) * Add src/test_utils/ and src/core paths to the target clean patterns (#1442) * Add code coverage reporting (#1478) * Add release build verification workflow (#1502) * Add Windows CI to the workflow (#2966) * Add retrying flaky jest tests (#2967) * Record functional test artifacts in case of failure (#3190) * Increase timeout waiting for the exiting of an optimizer worker (#3193) * Improve yarn's performance in workflows by caching yarn's cache folder (#3194) * Fix the version of Chrome to 107 to match `chromedriver@107.0.1`, the last that works on NodeJS v10 * Prevent `AbortError` from breaking unit tests for ExecutionContract Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <amoo_miki@yahoo.com>
Description
Interesting flakiness in the test. After the jest upgrade, our tests
got more performant.
The JUnit Report integ test was actually expecting
anything
for a fieldtime
. Thistime
was calculated on elapsed time to the0.00x
valueanything faster would actually be undefined and at that point
anything
fails because
anything
cannot be undefined.tl;dr: This test became flakey because our tests now run too fast.
Signed-off-by: Kawika Avilla kavilla414@gmail.com
Issues Resolved
n/a
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr