[Checkins] SVN: zope3org/trunk/src/zorg/live/ftest/fakeftest_threaded.py threading test fixed

Uwe Oestermeier uwe_oestermeier at iwm-kmrc.de
Sun Apr 9 17:31:11 EDT 2006


Log message for revision 66754:
  threading test fixed

Changed:
  U   zope3org/trunk/src/zorg/live/ftest/fakeftest_threaded.py

-=-
Modified: zope3org/trunk/src/zorg/live/ftest/fakeftest_threaded.py
===================================================================
--- zope3org/trunk/src/zorg/live/ftest/fakeftest_threaded.py	2006-04-09 21:18:14 UTC (rev 66753)
+++ zope3org/trunk/src/zorg/live/ftest/fakeftest_threaded.py	2006-04-09 21:31:11 UTC (rev 66754)
@@ -685,7 +685,11 @@
             text = "GET %s HTTP/1.0\r\nHost: %s\r\n\r\n" % (self.path, self.host)
         self.send(text)
         self.bytes_out = self.bytes_out + len(text)
+        
+      #  print "Client sending", text
 
+        time.sleep(0.5)                     # uo: a short delay seems to be necessary
+
     def handle_expt(self):
         # connection failed; notify consumer
         self.close()
@@ -784,6 +788,9 @@
         do_request(wireurl, dc, data)
 
 class user_consumer(base_consumer):
+
+    ignore = ["online", "idle"]             # uo: ignore these for now
+    
     def __init__(self, uid):
         self.expected = []
         base_consumer.__init__(self)
@@ -808,15 +815,20 @@
         
         exp = self.expected[0]
         
-        if retval.get('id','') != exp[0]:
-            print "FAIL"
-        else:
-            x=retval['html']
-            if x != exp[1]:
-                #elso?@?@?
-                print "FAIL",x,exp
-            self.expected.pop(0)
+        if retval.get('id','') not in self.ignore :
+            
+       #     print "expected: ", exp[0], exp[1]
+       #    print "got:      ", retval.get('id',''), retval['html']
         
+            if retval.get('id','') != exp[0]:
+                print "FAIL"
+            else:
+                x=retval['html']
+                if x != exp[1]:
+                    #elso?@?@?
+                    print "FAIL",x,exp
+                self.expected.pop(0)
+        
         self.data=''
         dc = self
         wireurl = OUTURL % {'uuid':self.uid}
@@ -839,6 +851,7 @@
             'extra':'scroll',
             '_':''}
     do_request(wireurl, dc, data)
+    
 
 outputb1 = Browser()
 uid1 = getUid(outputb1)



More information about the Checkins mailing list