Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky TestServiceLogs due to TestCurrentUserGroup reusing manager (…
…#242) This was causing intermittent failures in TestServiceLogs (on the order of 50% of the time), see test failure output below. START: manager_test.go:456: S.TestServiceLogs START: manager_test.go:147: S.SetUpTest PASS: manager_test.go:147: S.SetUpTest 0.000s 2023-06-19T11:13:02.294Z [test] Service "test1" starting: /bin/sh -c "echo test1 | tee -a /tmp/check-270658404/27/log.txt; sleep 10" 2023-06-19T11:13:02.346Z [test] Service "test2" starting: /bin/sh -c "echo test2 | tee -a /tmp/check-270658404/27/log.txt; sleep 10" 2023-06-19T11:13:02.368Z [test] Service "usrtest" starting: /bin/sh -c "id -n -u | tee -a /tmp/check-270658404/8/log.txt; sleep 0.060000000000000005" manager_test.go:461: s.testServiceLogs(c, outputs) manager_test.go:204: c.Assert(s.logBuffer.String(), Matches, "(?s)"+expected) ... value string = "" + ... "2023-06-19T11:13:02.300Z [test1] test1\n" + ... "2023-06-19T11:13:02.348Z [test2] test2\n" + ... "2023-06-19T11:13:02.372Z [usrtest] runner\n" ... regex string = "" + ... "(?s).*test1\n" + ... ".*test2\n" START: manager_test.go:183: S.TearDownTest PASS: manager_test.go:183: S.TearDownTest 0.000s FAIL: manager_test.go:456: S.TestServiceLogs
- Loading branch information