Skip to content

Commit a812e1a

Browse files
committed
Fix integration test: Allow some time for the mocked-monitor process to terminate
otherwise the test will fail on Windows when the cleanup function tries to remove the executable: Error Trace: D:/a/arduino-cli/arduino-cli/internal/integrationtest/environment.go:46 D:/a/arduino-cli/arduino-cli/internal/integrationtest/environment.go:56 D:/a/arduino-cli/arduino-cli/internal/integrationtest/environment.go:56 D:/a/arduino-cli/arduino-cli/internal/integrationtest/environment.go:62 D:/a/arduino-cli/arduino-cli/internal/integrationtest/daemon/daemon_concurrency_test.go:127 Error: Received unexpected error: remove C:\Users\runneradmin\AppData\Local\Temp\cli2489057723\A\packages\builtin\tools\serial-monitor\0.14.1\serial-monitor.exe: Access is denied. Test: TestInitAndMonitorConcurrency
1 parent 5768352 commit a812e1a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/integrationtest/daemon/daemon_concurrency_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,9 @@ func TestInitAndMonitorConcurrency(t *testing.T) {
124124
require.LessOrEqual(t, time.Since(start), 4*time.Second)
125125
cancel()
126126
monitorCompleted.Wait()
127+
128+
// Allow some time for the mocked-monitor process to terminate (otherwise the
129+
// test will fail on Windows when the cleanup function tries to remove the
130+
// executable).
131+
time.Sleep(2 * time.Second)
127132
}

0 commit comments

Comments
 (0)