improved test

This commit is contained in:
Florian Schlegel
2016-07-20 16:35:34 +02:00
parent 4d2e4d7f56
commit 229be2b4e4
+4
View File
@@ -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")
}