Skip to content

Added 2 new tests related to the SGW database - CBS bucket connectivity#309

Merged
borrrden merged 9 commits intomainfrom
db_online_offline
Nov 14, 2025
Merged

Added 2 new tests related to the SGW database - CBS bucket connectivity#309
borrrden merged 9 commits intomainfrom
db_online_offline

Conversation

@vipbhardwaj
Copy link
Contributor

There two tests are migrated from the following file from testkit.

It has the tests :

  1. test_db_offline_tap_loss_sanity -> test_db_offline_on_bucket_deletion
  2. test_multiple_dbs_unique_buckets_lose_tap -> test_multiple_dbs_bucket_deletion

Copy link

@RIT3shSapata RIT3shSapata left a comment

Choose a reason for hiding this comment

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

I see there's duplicated code for checking if the database is online or offline. There is a dedicated endpoint in SGW to check the status of each database, please consider using that or the endpoint to check the status of each database.

@vipbhardwaj
Copy link
Contributor Author

This commit addresses the comments from before, plus some modifications to the method for fetching the database status.
Added a class to actually address and accept the response params from the GET /db request and hence using them gracefully.
Plus I have removed min testservers(0) from all the other files as well and changed the handling of the database status method in those files as well.

Copy link

@RIT3shSapata RIT3shSapata left a comment

Choose a reason for hiding this comment

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

A small nit, you can choose to not implement this, but instead of running an infinite loop, you can add a sleep of 10s, as that is the interval in which SGW scans CB Server and checks if the buckets and configurations exist or not.

@vipbhardwaj
Copy link
Contributor Author

Cleaned up this PR for the sake of Infra, while #306 is on hold, I think we can get this merged for now?
Moved the lambda func to the test file too. api file is clean with the SGW APIs. @borrrden

Copy link
Member

@borrrden borrrden left a comment

Choose a reason for hiding this comment

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

I think after these comments it will surely be small and ok

@borrrden borrrden merged commit 7f0e101 into main Nov 14, 2025
4 checks passed
@borrrden borrrden deleted the db_online_offline branch November 14, 2025 23:14
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.

3 participants