internal/servers/worker: fix TestWorkerWaitForNextSuccessfulStatusUpdate (#1402)
This fixes this test which was failing intermittently. * Ups the grace period timeout to 2s. * Re-positions the testify require.New() so that incorrect code path warnings are not given.
This commit is contained in:
1 parent
2dae498123
commit
aae0c29f88
1 file changed
+3
-2
@@ -14,9 +14,10 @@ import (
|
||||
|
||||
func TestWorkerWaitForNextSuccessfulStatusUpdate(t *testing.T) {
|
||||
t.Parallel()
|
||||
require := require.New(t)
|
||||
for _, name := range []string{"ok", "timeout"} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
require := require.New(t)
|
||||
|
||||
// As-needed initialization of a mock worker
|
||||
w := &Worker{
|
||||
logger: hclog.New(nil),
|
||||
@@ -24,7 +25,7 @@ func TestWorkerWaitForNextSuccessfulStatusUpdate(t *testing.T) {
|
||||
baseContext: context.Background(),
|
||||
conf: &Config{
|
||||
Server: &base.Server{
|
||||
StatusGracePeriodDuration: time.Second * 1,
|
||||
StatusGracePeriodDuration: time.Second * 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user