Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxins committed Feb 2, 2024
1 parent 8033963 commit dbf83de
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions session_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,12 @@ func TestSessionPoolApplySchema(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, 1, len(spaces), "should have 1 space")
assert.Equal(t, "test_space_schema", spaces[0].Name, "space name should be test_space_schema")
assert.LessOrEqual(t, 1, len(spaces), "should have at least 1 space")
var spaceNames []string
for _, space := range spaces {
spaceNames = append(spaceNames, space.Name)
}
assert.Contains(t, spaceNames, "test_space_schema", "should have test_space_schema")

tagSchema := LabelSchema{
Name: "account",
Expand Down Expand Up @@ -430,7 +434,7 @@ func TestSessionPoolApplySchema(t *testing.T) {
assert.Equal(t, "email", labels[1].Field, "field name should be email")
assert.Equal(t, "string", labels[1].Type, "field type should be string")
assert.Equal(t, "phone", labels[2].Field, "field name should be phone")
assert.Equal(t, "int64", labels[2].Type, "field type should be string")
assert.Equal(t, "int64", labels[2].Type, "field type should be int64")

edgeSchema := LabelSchema{
Name: "account_email",
Expand Down

0 comments on commit dbf83de

Please sign in to comment.