Skip to content

Commit

Permalink
fix test issue
Browse files Browse the repository at this point in the history
  • Loading branch information
forcodedancing committed Jun 1, 2023
1 parent 460ca5d commit 6ce6de9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions e2e/tests/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ func (s *StorageTestSuite) TestDiscontinueObject_Normal() {
}
}

time.Sleep(200 * time.Millisecond)
events := make([]storagetypes.EventDeleteObject, 0)
for heightBefore <= heightAfter {
blockRes, err := s.TmClient.TmClient.BlockResults(context.Background(), &heightBefore)
Expand Down Expand Up @@ -1107,6 +1108,7 @@ func (s *StorageTestSuite) TestDiscontinueObject_Normal() {
}
}

time.Sleep(200 * time.Millisecond)
events = make([]storagetypes.EventDeleteObject, 0)
for heightBefore <= heightAfter {
blockRes, err := s.TmClient.TmClient.BlockResults(context.Background(), &heightBefore)
Expand Down Expand Up @@ -1140,7 +1142,7 @@ func (s *StorageTestSuite) TestDiscontinueObject_UserDeleted() {
heightBefore := txRes.Height
heightAfter := int64(0)
for {
time.Sleep(500 * time.Millisecond)
time.Sleep(200 * time.Millisecond)
statusRes, err := s.TmClient.TmClient.Status(context.Background())
s.Require().NoError(err)
blockTime := statusRes.SyncInfo.LatestBlockTime.Unix()
Expand All @@ -1155,6 +1157,7 @@ func (s *StorageTestSuite) TestDiscontinueObject_UserDeleted() {
}
}

time.Sleep(200 * time.Millisecond)
events := make([]storagetypes.EventDeleteObject, 0)
for heightBefore <= heightAfter {
blockRes, err := s.TmClient.TmClient.BlockResults(context.Background(), &heightBefore)
Expand Down Expand Up @@ -1211,6 +1214,7 @@ func (s *StorageTestSuite) TestDiscontinueBucket_Normal() {
}
}

time.Sleep(200 * time.Millisecond)
events := make([]storagetypes.EventDeleteBucket, 0)
for heightBefore <= heightAfter {
blockRes, err := s.TmClient.TmClient.BlockResults(context.Background(), &heightBefore)
Expand Down Expand Up @@ -1250,6 +1254,7 @@ func (s *StorageTestSuite) TestDiscontinueBucket_Normal() {
}
}

time.Sleep(200 * time.Millisecond)
events = make([]storagetypes.EventDeleteBucket, 0)
for heightBefore <= heightAfter {
blockRes, err := s.TmClient.TmClient.BlockResults(context.Background(), &heightBefore)
Expand Down Expand Up @@ -1286,7 +1291,7 @@ func (s *StorageTestSuite) TestDiscontinueBucket_UserDeleted() {
heightBefore := txRes.Height
heightAfter := int64(0)
for {
time.Sleep(500 * time.Millisecond)
time.Sleep(200 * time.Millisecond)
statusRes, err := s.TmClient.TmClient.Status(context.Background())
s.Require().NoError(err)
blockTime := statusRes.SyncInfo.LatestBlockTime.Unix()
Expand All @@ -1301,6 +1306,7 @@ func (s *StorageTestSuite) TestDiscontinueBucket_UserDeleted() {
}
}

time.Sleep(200 * time.Millisecond)
events := make([]storagetypes.EventDeleteBucket, 0)
for heightBefore <= heightAfter {
blockRes, err := s.TmClient.TmClient.BlockResults(context.Background(), &heightBefore)
Expand Down

0 comments on commit 6ce6de9

Please sign in to comment.