Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Aug 6, 2024
1 parent 632ce19 commit 4ae8150
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/repository/sequence/mongo_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func TestNewMongoRepository_GetNextExecutionNumber_Sequential_Integration(t *tes
}

for _, tt := range tests {
num, err := repo.GetNextExecutionNumber(ctx, "name", tt.executionType)
num, err := repo.GetNextExecutionNumber(ctx, tt.name, tt.executionType)
assert.NoError(t, err)
assert.Equal(t, tt.expectedValue, num)
}
Expand Down Expand Up @@ -156,14 +156,14 @@ func TestNewMongoRepository_GetNextExecutionNumber_Parallel_Integration(t *testi

for i := range tests {
wg.Add(1)
go func(executionType ExecutionType) {
go func(name string, executionType ExecutionType) {
defer wg.Done()

num, err := repo.GetNextExecutionNumber(ctx, tests[i].name, executionType)
num, err := repo.GetNextExecutionNumber(ctx, name, executionType)
assert.NoError(t, err)

results.Store(fmt.Sprintf("%s_%d", executionType, num), num)
}(tests[i].executionType)
}(tests[i].name, tests[i].executionType)
}

wg.Wait()
Expand Down

0 comments on commit 4ae8150

Please sign in to comment.