-
Notifications
You must be signed in to change notification settings - Fork 125
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
[PROPOSAL] Remove waitCluster in Integration Tests #422
Labels
good first issue
Good for newcomers
Comments
Workarounds to run integration tests locally:
|
Wielmany
added a commit
to Wielmany/opensearch-js
that referenced
this issue
Mar 9, 2023
Signed-off-by: Didar Tursunov <[email protected]>
Wielmany
added a commit
to Wielmany/opensearch-js
that referenced
this issue
Mar 10, 2023
Wielmany
added a commit
to Wielmany/opensearch-js
that referenced
this issue
Mar 10, 2023
Signed-off-by: Didar Tursunov <[email protected]>
Wielmany
added a commit
to Wielmany/opensearch-js
that referenced
this issue
Mar 10, 2023
Signed-off-by: Didar Tursunov <[email protected]>
I suggest 1) documenting this in developer guide with something one can just copy-paste, 2) actually fixing integration tests to ignore existing data so that they can run on top of whatever is in an existing instance of OpenSearch (new issue?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Every integration test starts of by hitting waitCluster method, which waits for the cluster to be up and ready before the test is executed. This is redundant because we have already implemented healthcheck along with autoheal to assure that the OS cluster is up and running before the integration workflow executes these tests.
Moreover,
waitCluster
is waiting for status ofgreen
, which is usually not applicable for local testing because:Since we're testing the client functionality (mostly API endpoints), the OS cluster only has a single node (for simplicity and it's sufficient for development and testing). However, by default every index created requires 1 replica, which means it needs a 2nd node to deploy a backup copy to. This causes the index to have status of
yellow
, which leads towaitCluster
to wait forever if there's any index already exists on the OS cluster. For most developers, it's normal to have a few existing indices on the local OS cluster for development. But we have to delete these indices or change their replicas_count to 0 if we want to run the integration tests locally.Note that having a yellow status on single-node cluster is normal. The cluster is still working as intended. You just dont have a backup copy of the indices. I would say this is a bug from the server standpoint: Indices shouldn't have number of replicate set to 1 by default if there's only 1 node in the cluster.
In other words, we should remove
waitCluster
because:The text was updated successfully, but these errors were encountered: