Skip to content

Commit

Permalink
add delay to other tests too
Browse files Browse the repository at this point in the history
  • Loading branch information
gregns1 committed Jan 7, 2025
1 parent 84b68be commit 7853d12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rest/config_database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func TestDbConfigUpdatedAtField(t *testing.T) {
require.NotNil(t, unmarshaledConfig.UpdatedAt)
currTime := unmarshaledConfig.UpdatedAt

// avoid flake where update at seems to be the same (possibly running to fast)
time.Sleep(500 * time.Nanosecond)

// Update the config
dbConfig = rt.NewDbConfig()
RequireStatus(t, rt.UpsertDbConfig("db1", dbConfig), http.StatusCreated)
Expand Down
3 changes: 3 additions & 0 deletions rest/replicatortest/replicator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8598,6 +8598,9 @@ func TestReplicationConfigUpdatedAt(t *testing.T) {
require.NotNil(t, configResponse.UpdatedAt)
currTime := configResponse.UpdatedAt

// avoid flake where update at seems to be the same (possibly running to fast)
time.Sleep(500 * time.Nanosecond)

resp = activeRT.SendAdminRequest("PUT", "/{{.db}}/_replicationStatus/replication1?action=stop", "")
rest.RequireStatus(t, resp, http.StatusOK)

Expand Down

0 comments on commit 7853d12

Please sign in to comment.