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

Adds retrying flaky jest tests #2967

Merged
merged 5 commits into from
Dec 29, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

- [Multi DataSource] Add unit test coverage for Update Data source management stack ([#2567](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2567))
- [BWC Tests] Add BWC tests for 2.5.0 ([#2890](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2890))
- Add retrial of flaky tests ([#2967](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2967))
- Fix incorrect validation of time values in JUnit Reporter ([#2965](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2965))

## [2.x]
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
"**/trim": "^0.0.3",
"**/typescript": "4.0.2",
"**/unset-value": "^2.0.1",
"**/minimatch": "^3.0.5"
"**/minimatch": "^3.0.5",
"**/jest-config": "npm:@amoo-miki/jest-config@27.5.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need both the resolutions and changes in yarn.lock?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah; to force nested and external.

"**/jest-jasmine2": "npm:@amoo-miki/jest-jasmine2@27.5.1"
},
"workspaces": {
"packages": [
Expand Down
1 change: 1 addition & 0 deletions src/dev/jest/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@ export default {
globals: {
Uint8Array: Uint8Array,
},
flakyTestRetries: 2,
};
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11062,10 +11062,10 @@ jest-cli@^27.5.1:
prompts "^2.0.1"
yargs "^16.2.0"

jest-config@^27.5.1:
jest-config@^27.5.1, "jest-config@npm:@amoo-miki/jest-config@27.5.1":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to used osd-pm to build out packages so that we can source control in this repo and not need to publish from a personal account?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we could, I was hoping to use that option for long-term packages we want to own. This one will go away as soon as we get rid of Angular and we can use jest-circus.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it clear how long it will be before Angular is removed? I don't see a clear timeline or outline of how much work is left in #1560.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, unfortunately the amount of work left in the deangularization is not trivial. I could be swayed either way, but I lean toward Rocky's suggestion of adding it to packages instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to try that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Donno how trivial that will be. Will try later.

version "27.5.1"
resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41"
integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==
resolved "https://registry.yarnpkg.com/@amoo-miki/jest-config/-/jest-config-27.5.1.tgz#3afdb485fdccad8fd8b19be505747cafbf8e6707"
integrity sha512-6pSD/Lo5axflM2NO0eIHuJ40nxfXn2NQGqzOCrZO1EE7yS3k90p10RalInf8RXl2g9/f1Ax4U4aU2e3BWSaSaQ==
dependencies:
"@babel/core" "^7.8.0"
"@jest/test-sequencer" "^27.5.1"
Expand Down Expand Up @@ -11170,10 +11170,10 @@ jest-haste-map@^27.5.1:
optionalDependencies:
fsevents "^2.3.2"

jest-jasmine2@^27.5.1:
jest-jasmine2@^27.5.1, "jest-jasmine2@npm:@amoo-miki/jest-jasmine2@27.5.1":
version "27.5.1"
resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4"
integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==
resolved "https://registry.yarnpkg.com/@amoo-miki/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#0c99502f9879e1504b124da8355880924de1f310"
integrity sha512-oOihnJGLdFZO780Ts6XR+Sbs8d4J0+sqcNvBNcJch/LSKpQt7rARi0V+TgF80LRAvJI4gyq97az/2fdXXgxDNg==
dependencies:
"@jest/environment" "^27.5.1"
"@jest/source-map" "^27.5.1"
Expand Down