mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-06 10:05:58 +08:00
errcode
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package utils
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestGenID(t *testing.T) {
|
||||
m := map[string]struct{}{}
|
||||
for i := 0; i < 2000; i++ {
|
||||
got := GenID()
|
||||
if _, ok := m[got]; !ok {
|
||||
m[got] = struct{}{}
|
||||
} else {
|
||||
t.Error("id generate error", got)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user