Permalink
Browse files

Fix #52 - make test_anyValue rerunnable without the delay

  • Loading branch information...
1 parent da4c709 commit 2e6f542451784392d3d1b2aa6c0f7f6294709e6c @majek majek committed May 31, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 sockjs-protocol-dev.py
@@ -14,6 +14,7 @@
using real browsers are always required.
"""
import os
+import random
import time
import json
import re
@@ -337,8 +338,10 @@ class SessionURLs(Test):
# The server must accept any value in `server` and `session` fields.
def test_anyValue(self):
- self.verify('/a/a')
- for session_part in ['/_/_', '/1/1', '/abcdefgh_i-j%20/abcdefg_i-j%20']:
+ # add some randomness, so that test could be rerun immediately.
+ r = '%s' % random.randint(0, 1024)
+ self.verify('/a/a' + r)
+ for session_part in ['/_/_' + r, '/1/' + r, '/abcdefgh_i-j%20/abcdefg_i-j%20'+ r]:
self.verify(session_part)
# To test session URLs we're going to use `xhr-polling` transport

0 comments on commit 2e6f542

Please sign in to comment.