Skip to content

Commit b4fd2b6

Browse files
authored
test(datastore): Isolate to fix flaky IgnoreFieldMismatch (#13557)
Updated `datastore/integration_test.go` to use `suffix` in `NameKey` construction for `TestIntegration_IgnoreFieldMismatch`. This ensures the test operates on isolated entities, preventing flakey `datastore: no such entity` errors caused by collisions. Fixes: #12808 After fix: ```go $ go test -count=20 -timeout 45m -run ^TestIntegration_IgnoreFieldMismatch$ 2026/01/08 15:42:41 Setting up tests to run on databaseID: "" PASS ok cloud.google.com/go/datastore 47.186s $ ```
1 parent 72dc163 commit b4fd2b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datastore/integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ func TestIntegration_IgnoreFieldMismatch(t *testing.T) {
284284

285285
// Save entities with an extra field
286286
keys := []*Key{
287-
NameKey("X", "x1", nil),
288-
NameKey("X", "x2", nil),
287+
NameKey("X", "x1"+suffix, nil),
288+
NameKey("X", "x2"+suffix, nil),
289289
}
290290
entitiesOld := []OldX{
291291
{I: 10, J: 20},

0 commit comments

Comments
 (0)