diff --git a/configmap/loglevel_change_test.go b/configmap/loglevel_change_test.go index 263a4dc..c6d4145 100644 --- a/configmap/loglevel_change_test.go +++ b/configmap/loglevel_change_test.go @@ -55,7 +55,7 @@ func TestDynamicLogLevelAndBinaryFlag(t *testing.T) { t.Fatalf("unable to write %v: %v", binaryFlag, err) } // Time based tests aren't great, specially when ran on (slow) CI try to have notification not get events for above. - time.Sleep(1 * time.Second) + time.Sleep(3 * time.Second) var u *configmap.Updater log.SetLogLevel(log.Debug) if u, err = configmap.Setup(flag.CommandLine, pDir); err != nil { @@ -76,7 +76,7 @@ func TestDynamicLogLevelAndBinaryFlag(t *testing.T) { t.Fatalf("unable to write %v: %v", fName, err) } // Time based tests aren't great, specially when ran on (slow) CI but... - time.Sleep(2 * time.Second) + time.Sleep(5 * time.Second) newLevel := log.GetLogLevel() if newLevel != log.Info { t.Errorf("Loglevel didn't change as expected, still %v %v", newLevel, newLevel.String()) @@ -89,7 +89,7 @@ func TestDynamicLogLevelAndBinaryFlag(t *testing.T) { if err = os.WriteFile(binaryFlag, []byte{1, 2, 3, 4, 5}, 0o644); err != nil { t.Fatalf("unable to write %v: %v", binaryFlag, err) } - time.Sleep(3 * time.Second) + time.Sleep(4 * time.Second) // We might get more than 1 event for some reasons, so more than 1 error errCount := u.Errors() if errCount < 1 { diff --git a/configmap/updater_test.go b/configmap/updater_test.go index d5376ae..b0a7322 100644 --- a/configmap/updater_test.go +++ b/configmap/updater_test.go @@ -37,7 +37,7 @@ type updaterTestSuite struct { func (s *updaterTestSuite) SetupTest() { var err error - s.tempDir, err = os.MkdirTemp("/tmp", "updater_test") + s.tempDir, err = os.MkdirTemp("", "updater_test") assert.NoError(s.T(), err, "failed creating temp directory for testing") s.copyTestDataToDir() s.linkDataDirTo(firstGoodDir) diff --git a/go.mod b/go.mod index 5bbc813..e06975f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( fortio.org/assert v1.2.1 - fortio.org/log v1.16.0 + fortio.org/log v1.17.1 fortio.org/sets v1.2.0 github.com/fsnotify/fsnotify v1.7.0 golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 diff --git a/go.sum b/go.sum index d22cff2..ac86c07 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ fortio.org/assert v1.2.1 h1:48I39urpeDj65RP1KguF7akCjILNeu6vICiYMEysR7Q= fortio.org/assert v1.2.1/go.mod h1:039mG+/iYDPO8Ibx8TrNuJCm2T2SuhwRI3uL9nHTTls= -fortio.org/log v1.16.0 h1:GhU8/9NkYZmEIzvTN/DTMedDAStLJraWUUVUA2EbNDc= -fortio.org/log v1.16.0/go.mod h1:t58Spg9njjymvRioh5F6qKGSupEsnMjXLGWIS1i3khE= +fortio.org/log v1.17.1 h1:YQoGyZBnXTVIs77/nZw7BppwSOIamP3I092PGBenBZs= +fortio.org/log v1.17.1/go.mod h1:t58Spg9njjymvRioh5F6qKGSupEsnMjXLGWIS1i3khE= fortio.org/sets v1.2.0 h1:FBfC7R2xrOJtkcioUbY6WqEzdujuBoZRbSdp1fYF4Kk= fortio.org/sets v1.2.0/go.mod h1:J2BwIxNOLWsSU7IMZUg541kh3Au4JEKHrghVwXs68tE= fortio.org/struct2env v0.4.1 h1:rJludAMO5eBvpWplWEQNqoVDFZr4RWMQX7RUapgZyc0=