Skip to content

Commit

Permalink
Merge pull request #227 from hashicorp/syncer-test
Browse files Browse the repository at this point in the history
Fix test configuration race.
  • Loading branch information
lkysow committed Mar 9, 2020
2 parents 40963d9 + 5bfb169 commit 19f8701
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions catalog/to-consul/syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ func TestConsulSyncer_noReapingUntilInitialSync(t *testing.T) {
Address: a.HTTPAddr,
})
require.NoError(t, err)
s, closer := testConsulSyncer(client)
// Set the sync period to 5ms so we know it will have run at least once
// after we wait 100ms.
s.SyncPeriod = 5 * time.Millisecond
s, closer := testConsulSyncerWithConfig(client, func(s *ConsulSyncer) {
// Set the sync period to 5ms so we know it will have run at least once
// after we wait 100ms.
s.SyncPeriod = 5 * time.Millisecond
})
defer closer()

// Create a service directly in Consul. Since it was created on the
Expand Down

0 comments on commit 19f8701

Please sign in to comment.