Skip to content
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

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Mar 10, 2022

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 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

Issues Resolved

n/a

Check List

  • New functionality includes testing.
    • All tests pass
      • yarn test:jest
      • yarn test:jest_integration
      • yarn test:ftr
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

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>
@kavilla kavilla requested a review from a team as a code owner March 10, 2022 10:00
Copy link
Contributor

@mihirsoni mihirsoni left a 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);
Copy link
Contributor

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 ?

@kavilla kavilla merged commit f7f9c22 into opensearch-project:main Mar 10, 2022
@kavilla kavilla deleted the avillk/junit-test-reporter branch March 10, 2022 20:03
@tmarkley
Copy link
Contributor

Interesting - did this just pop up? Was it only failing locally? We didn't have any failing integration tests in #1301.

@kavilla
Copy link
Member Author

kavilla commented Mar 14, 2022

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.

AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 20, 2023
* 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>
ananzh pushed a commit that referenced this pull request Jan 23, 2023
* 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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 23, 2023
…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>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 24, 2023
…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>
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Jan 24, 2023
* 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>
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Jan 24, 2023
* 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>
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Jan 24, 2023
* 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>
ananzh pushed a commit that referenced this pull request Jan 25, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants