diff --git a/test/ocsp_test.go b/test/ocsp_test.go
index <HASH>..<HASH> 100644
--- a/test/ocsp_test.go
+++ b/test/ocsp_test.go
@@ -130,6 +130,8 @@ func TestOCSPAlwaysMustStapleAndShutdown(t *testing.T) {
 	if err != nats.ErrNoServers {
 		t.Errorf("Expected connection refused")
 	}
+	// Verify that the server finishes shutdown
+	srv.WaitForShutdown()
 }
 
 func TestOCSPMustStapleShutdown(t *testing.T) {
Wait for complete server shutdown in a test