Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions block/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ func TestProcessNextDAHeaderAndData_MixedResults(t *testing.T) {
}

for _, tt := range tests {
tt := tt
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

Removing the tt := tt shadowing is only safe if the project's Go version is 1.22 or higher. This change relies on the new loop variable semantics introduced in Go 1.22. If the project is compiled with an older Go version, this will introduce a race condition in these parallel tests, causing them to behave incorrectly and fail unpredictably.

Recommendation:
To prevent this critical issue, the go.mod file must be updated to go 1.22 or newer as part of this pull request. If updating the Go version is not possible, this change should be reverted.

t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -234,7 +233,6 @@ func TestNamespaceMigration_Completion(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -426,7 +424,6 @@ func TestLegacyNamespaceDetection(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down
Loading