Skip to content

Commit f7383a2

Browse files
SNOW-2473789 Fix wiremock tests cleanup (#1267)
1 parent e283dd3 commit f7383a2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Snowflake.Data.Tests/Util/WiremockRunner.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,18 @@ private void Start()
146146

147147
public void Stop()
148148
{
149-
_process?.Kill();
149+
if (_process != null && !_process.HasExited)
150+
{
151+
try
152+
{
153+
_process.Kill();
154+
}
155+
catch (InvalidOperationException)
156+
{
157+
// Process already exited, ignore
158+
}
159+
_process = null;
160+
}
150161
IsAvailable = false;
151162
}
152163

0 commit comments

Comments
 (0)