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

Fix test for single Node and consume numNodes #1091

Merged

Conversation

monusingh-1
Copy link
Collaborator

@monusingh-1 monusingh-1 commented Jul 23, 2023

Description

Skip test when single node clusters are used.

wait_for_active_shards setting will not allow the index to close as more than 1 shard will not be active.
This causes the test to fail.

{"acknowledged":false,"shards_acknowledged":false,"indices":{"remote-index":{"closed":false,"failedShards":{"0":{"failures":[{"shard":0,"index":"remote-index","status":"SERVICE_UNAVAILABLE","reason":{"type":"unavailable_shards_exception","reason":"[remote-index][0] Not enough active copies to meet shard count of [2] (have 1, needed 2). Timeout: [30s], request: [verify shard [remote-index][0] before close with block 4,RRq3_-4RRi2uSs03x15Odw,index preparing to close. Reopen the index to allow writes again or retry closing the index to fully close the index., blocks WRITE]"}}]}}}}}%

numNodes parameter was not getting consumed by the integTestRemote gradle task.
numNodes param is used to set isMultiNodeClusterConfiguration which is used to skip tests like reroute.

This change allows numNodes param to be used.

Modified checks to skip Remote integration tests
Assume.assumeTrue(checkifIntegTestRemote())

Ref
#1078
#1085

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Jul 23, 2023

Codecov Report

Merging #1091 (8b895cc) into main (505e242) will decrease coverage by 0.40%.
The diff coverage is n/a.

❗ Current head 8b895cc differs from pull request most recent head a34afea. Consider uploading reports for the commit a34afea to get more accurate results

@@             Coverage Diff              @@
##               main    #1091      +/-   ##
============================================
- Coverage     75.25%   74.85%   -0.40%     
+ Complexity     1026     1022       -4     
============================================
  Files           141      141              
  Lines          4761     4761              
  Branches        521      521              
============================================
- Hits           3583     3564      -19     
- Misses          846      862      +16     
- Partials        332      335       +3     

see 6 files with indirect coverage changes

@monusingh-1 monusingh-1 changed the title Fix test for single test Fix test for single Node and consume numNodes Jul 24, 2023
@monusingh-1 monusingh-1 marked this pull request as ready for review July 24, 2023 03:46
@monusingh-1 monusingh-1 enabled auto-merge (squash) July 24, 2023 03:46
@monusingh-1 monusingh-1 merged commit 81b37ba into opensearch-project:main Aug 17, 2023
10 of 11 checks passed
@opensearch-trigger-bot
Copy link

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1091-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 81b37ba67efedbbebc804214e7384620006bc4da
# Push it to GitHub
git push --set-upstream origin backport/backport-1091-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1091-to-2.x.

@monusingh-1 monusingh-1 deleted the fix_single_node_test branch August 17, 2023 14:49
monusingh-1 added a commit to monusingh-1/ccr-dev that referenced this pull request Aug 18, 2023
monusingh-1 added a commit that referenced this pull request Aug 18, 2023
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