Skip to content

Commit

Permalink
changed the test case for get SafePoint
Browse files Browse the repository at this point in the history
Signed-off-by: Boyang Lyu <[email protected]>
  • Loading branch information
JackL9u committed Aug 8, 2024
1 parent c88639b commit 870f9cc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/integrations/client/http_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ func (suite *httpClientTestSuite) SetupSuite() {
{
ServiceID: "AAA",
ExpiredAt: time.Now().Unix() + 10,
SafePoint: 10,
SafePoint: 1,
},
{
ServiceID: "BBB",
ExpiredAt: time.Now().Unix() + 10,
SafePoint: 20,
SafePoint: 2,
},
{
ServiceID: "CCC",
ExpiredAt: time.Now().Unix() + 10,
SafePoint: 30,
SafePoint: 3,
},
},
GCSafePoint: 1,
Expand Down Expand Up @@ -874,23 +874,23 @@ func (suite *httpClientTestSuite) TestGetSafePoint() {
re.NoError(err)

re.Equal(uint64(1), l.GCSafePoint)
re.Equal(uint64(10), l.MinServiceGcSafepoint)
re.Equal(uint64(1), l.MinServiceGcSafepoint)
re.Len(l.ServiceGCSafepoints, 3)

for i, val := range l.ServiceGCSafepoints {
if i == 0 {
re.Equal("AAA", val.ServiceID)
re.Equal(uint64(10), val.SafePoint)
re.Equal(uint64(1), val.SafePoint)
}

if i == 1 {
re.Equal("BBB", val.ServiceID)
re.Equal(uint64(20), val.SafePoint)
re.Equal(uint64(2), val.SafePoint)
}

if i == 2 {
re.Equal("CCC", val.ServiceID)
re.Equal(uint64(30), val.SafePoint)
re.Equal(uint64(3), val.SafePoint)
}
}
}
Expand Down

0 comments on commit 870f9cc

Please sign in to comment.