mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 12:36:00 +08:00
feat: use robot to migrate code
Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
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