Skip to content

Commit 6e98313

Browse files
committed
Just stop the service from the problematic test.
1 parent 9430828 commit 6e98313

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/state-svc/test/integration/svc_int_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,16 @@ func (suite *SvcIntegrationTestSuite) TestSingleSvc() {
183183
// with due to other integration tests not always waiting for state-svc to have fully shut down before running the next test
184184
suite.Fail(fmt.Sprintf("spawning multiple state processes should only result in one more state-svc process at most, newCount: %d, oldCount: %d", newCount, oldCount))
185185
}
186-
suite.T().Log("oldCount:", oldCount, "newCount:", newCount)
187186

188187
// ts.Close() has logic to stop state-svc if ts.SvcExe exists.
189188
// It does this by invoking `state-svc stop`.
190189
// However, in the event we end up with less services than anticipated, `state-svc stop` will
191190
// fail with a non-zero exit code because there is no service to stop, and this will cause a
192191
// timeout error in ts.Close().
193192
// In order to prevent this, change ts.SvcExe to something that doesn't exist.
194-
if newCount < oldCount {
193+
if runtime.GOOS == "windows" {
194+
cp := ts.SpawnCmd(ts.SvcExe, "stop")
195+
cp.ExpectExit()
195196
ts.SvcExe = "does-not-exist"
196197
}
197198
}

0 commit comments

Comments
 (0)