Skip to content

Added retry loop#424

Open
vipbhardwaj wants to merge 3 commits into
mainfrom
SGW-flaky_test-fix
Open

Added retry loop#424
vipbhardwaj wants to merge 3 commits into
mainfrom
SGW-flaky_test-fix

Conversation

@vipbhardwaj

@vipbhardwaj vipbhardwaj commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves stability of the QE xattrs concurrency test by adding a bounded retry loop to wait for Sync Gateway to import SDK-written documents before asserting document visibility.

Changes:

  • Added a ~30s polling loop around sg.get_all_documents() to wait for imported docs to become visible.
  • Improved assertion messaging to include the polling budget context.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread client/src/cbltest/api/syncgateway.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment on lines 56 to 58
self.mark_test_step("Verify import_count in expvars")
expvars = await sg._send_request("get", "/_expvar")
assert isinstance(expvars, dict)
expvars_dict = cast(dict, expvars)
import_count = (
expvars_dict.get("syncgateway", {})
.get("per_db", {})
.get(sg_db, {})
.get("shared_bucket_import", {})
.get("import_count", 0)
)
import_count = await sg.wait_for_import_count(sg_db, num_docs)
assert import_count != 0, f"Expected import_count > 0, got {import_count}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants