Skip to content

Comments and improved exception handling#2

Open
veerkumar wants to merge 5 commits intodatadobi:masterfrom
veerkumar:master
Open

Comments and improved exception handling#2
veerkumar wants to merge 5 commits intodatadobi:masterfrom
veerkumar:master

Conversation

@veerkumar
Copy link

  1. Added comments on all the test cases
  2. Instead of traceback on test failure, print a more meaningful message.
  3. Cascade test failure: Added support to create a new bucket if the test fails during cleanup, and not to failthe test if teardown failed

@pepijnve
Copy link
Member

@veerkumar there are some merge conflicts being reported. Do you have time to resolve those?

@veerkumar
Copy link
Author

veerkumar commented Feb 11, 2026

Conflicts resolved. @pepijnve

bucket.create();
}
// If we used a fallback bucket, keep using new buckets for subsequent tests (original may still exist).
if (cleanupFailedNextBucket != null) {
Copy link
Member

@pepijnve pepijnve Feb 11, 2026

Choose a reason for hiding this comment

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

I would prefer to tackle this change separately from the documentation changes. I need to give this some more thought, but would like to get the comments merged already.

My concern here is that using a static, mutable, global variable is going to mess with test runs when, for instance, multiple tests are executed in parallel.

Would you mind splitting this off into a separate PR?


/**
* Puts an object, then attempts overwrite with If-None-Match: "<etag>" (create-only if etag differs).
* Expected: Overwrite fails with 412 (or 501 if unsupported); object content remains unchanged.
Copy link
Member

Choose a reason for hiding this comment

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

The 501 check has been removed in the meantime so that should be removed from the comment


/**
* Puts an object, then overwrites with If-Match: "<etag>" (update-only if etag matches).
* Expected: Overwrite succeeds; GET returns new content and new ETag; or 412/501 if precondition fails.
Copy link
Member

Choose a reason for hiding this comment

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

See earlier comment regarding 501

@pepijnve
Copy link
Member

As I was going through the descriptions I started to have concerns regarding the method level comments. I think the first paragraph describing the tests makes a lot of sense. The 'expected' part is what worries me. These mostly repeat the assertions in the test and already got out of sync with the actual test. I think I would prefer to have these as inline comments on the assertions (or just have them be the assertion message), so that drift between the description and implementation is no longer possible (or less likely).

@pepijnve pepijnve self-requested a review February 11, 2026 17:09
Copy link
Member

@pepijnve pepijnve left a comment

Choose a reason for hiding this comment

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

Review comments logged

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