diff --git a/spec/server_worker_context.rb b/spec/server_worker_context.rb
index <HASH>..<HASH> 100644
--- a/spec/server_worker_context.rb
+++ b/spec/server_worker_context.rb
@@ -256,10 +256,12 @@ shared_context 'test server and worker' do
   before { reset_test_state }
   after { Timecop.return }
 
-  if ServerEngine.windows?
-    WAIT_RATIO = 2
-  else
-    WAIT_RATIO = 1
+  unless self.const_defined?(:WAIT_RATIO)
+    if ServerEngine.windows?
+      WAIT_RATIO = 2
+    else
+      WAIT_RATIO = 1
+    end
   end
 
   def wait_for_fork
Fix a warning while running test

```
C:/Users/aho/Projects/serverengine/spec/server_worker_context.rb:<I>: warning: already initialized constant WAIT_RATIO
C:/Users/aho/Projects/serverengine/spec/server_worker_context.rb:<I>: warning: previous definition of WAIT_RATIO was here
```