Skip to content

Commit c7760a5

Browse files
committed
Workaround for failing tests that seems to re-use the instance. Is that even supported?
1 parent 735446a commit c7760a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ServiceControl.RavenDB/EmbeddedDatabase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public async Task Stop(CancellationToken cancellationToken)
213213
}
214214
}
215215

216-
EmbeddedServer.Instance = null!;
216+
serverOptions = null!;
217217
Logger.Debug("Stopped RavenDB server");
218218
}
219219

@@ -224,14 +224,14 @@ public void Dispose()
224224
return;
225225
}
226226

227-
if (EmbeddedServer.Instance != null)
227+
if (serverOptions != null)
228228
{
229229
EmbeddedServer.Instance.ServerProcessExited -= OnServerProcessExited;
230230
}
231231

232232
shutdownTokenSource.Cancel();
233233

234-
if (EmbeddedServer.Instance != null)
234+
if (serverOptions != null)
235235
{
236236
// Set GracefulShutdownTimeout to Zero and exist ASAP, under normal operation instance would already
237237
// have been allowed to gracefully stop during "Stop" method.

0 commit comments

Comments
 (0)