mirror of
https://github.com/foomo/shop.git
synced 2026-08-16 22:50:23 +00:00
improved test
This commit is contained in:
@@ -39,6 +39,10 @@ func TestCreateUniqueIdsConcurrent(t *testing.T) {
|
||||
go generate("3", &wg)
|
||||
go generate("4", &wg)
|
||||
wg.Wait()
|
||||
log.Println("Id's in map: ", len(generatedIds))
|
||||
if len(generatedIds) != 4000 {
|
||||
t.Fatal("Expected 4000 ID's but got ", len(generatedIds))
|
||||
}
|
||||
log.Println("All go routines finished")
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user