diff --git a/go.mod b/go.mod index a4bed1d..add87c5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.17 require ( github.com/longbridgeapp/assert v0.1.0 github.com/longbridgeapp/sqlparser v0.2.0 - github.com/stretchr/testify v1.7.0 gorm.io/driver/postgres v1.1.0 gorm.io/gorm v1.21.16 gorm.io/hints v0.0.0-20210614014355-b8cf5492cb94 @@ -24,6 +23,7 @@ require ( github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.7.0 // indirect golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect golang.org/x/text v0.3.6 // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect diff --git a/keygen/id_test.go b/keygen/id_test.go index f5d538f..5aad8b2 100644 --- a/keygen/id_test.go +++ b/keygen/id_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" + "github.com/longbridgeapp/assert" ) func TestNext(t *testing.T) { @@ -12,7 +12,7 @@ func TestNext(t *testing.T) { ipv4, err := getIPv4() assert.Nil(t, err) - assert.GreaterOrEqual(t, time.Now().UnixNano()/1e6, int64(id>>int64(timeLeft))+twepoch) + assert.Equal(t, true, time.Now().UnixNano()/1e6 >= int64(id>>int64(timeLeft))+twepoch) assert.Equal(t, int(ipv4[3])%64, getWorkerNumber(id)) assert.Equal(t, 24, TableIdx(id)) }