Skip to content

fix(storage): resolve race condition in archived generation tests - #24

Open
mahendra-google wants to merge 2 commits into
mainfrom
fix/file-archived-generation-tests-flakes
Open

fix(storage): resolve race condition in archived generation tests#24
mahendra-google wants to merge 2 commits into
mainfrom
fix/file-archived-generation-tests-flakes

Conversation

@mahendra-google

@mahendra-google mahendra-google commented Jul 29, 2026

Copy link
Copy Markdown
Owner

This PR provides a fix to the issue and
resolves the test flakiness observed in the archived generation tests (such as CopyFileArchivedGenerationTest , ListFileArchivedGenerationTest and DeleteFileArchivedGenerationTest).

Previously, these tests were failing intermittently with 404 No such object or assertion errors (Expected: 2, Actual: 1).

Because the tests were creating, modifying, and deleting objects immediately after enabling versioning, GCS had not always propagated the versioning state, resulting in objects being permanently deleted instead of archived.

This change removes bucket versioning toggling from generation tests and introduces BucketNameVersioned (shared multi version bucket) in the StorageFixture and utilized shared versioned bucket across all generation tests eliminating race conditions.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Comment thread storage/api/Storage.Samples.Tests/StorageFixture.cs Outdated
Comment thread storage/api/Storage.Samples.Tests/CopyFileArchivedGenerationTest.cs
@mahendra-google
mahendra-google marked this pull request as draft July 31, 2026 05:16
@mahendra-google
mahendra-google marked this pull request as ready for review August 3, 2026 06:27
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@mahendra-google
mahendra-google force-pushed the fix/file-archived-generation-tests-flakes branch from 994e266 to ad6317e Compare August 3, 2026 09:24
Introduce a pre-configured versioned bucket in the StorageFixture to eliminate
GCS metadata propagation delays and utilized shared versioned bucket across all generation tests
@mahendra-google
mahendra-google force-pushed the fix/file-archived-generation-tests-flakes branch from 60d383d to 7435e04 Compare August 3, 2026 09:53
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