@@ -73,7 +73,7 @@ def test_submit_and_clean(self):
7373 self .index .refresh ()
7474 originalCount = int (self .index ['totalEventCount' ])
7575 self .index .submit ("Hello again!" , sourcetype = "Boris" , host = "meep" )
76- self .assertEventuallyTrue (lambda : self .totalEventCount == originalCount + 1 )
76+ self .assertEventuallyTrue (lambda : self .totalEventCount () == originalCount + 1 , timeout = 50 )
7777
7878 # Cleaning an enabled index on 4.x takes forever, so we disable it.
7979 # However, cleaning it on 5 requires it to be enabled.
@@ -91,21 +91,21 @@ def test_submit(self):
9191 self .assertEqual (self .index ['sync' ], '0' )
9292 self .assertEqual (self .index ['disabled' ], '0' )
9393 self .index .submit ("Hello again!" , sourcetype = "Boris" , host = "meep" )
94- self .assertEventuallyTrue (lambda : self .totalEventCount == eventCount + 1 )
94+ self .assertEventuallyTrue (lambda : self .totalEventCount () == eventCount + 1 , timeout = 50 )
9595
9696 def test_submit_via_attach (self ):
9797 eventCount = int (self .index ['totalEventCount' ])
9898 cn = self .index .attach ()
9999 cn .send ("Hello Boris!\r \n " )
100100 cn .close ()
101- self .assertEventuallyTrue (lambda : self .totalEventCount == eventCount + 1 )
101+ self .assertEventuallyTrue (lambda : self .totalEventCount () == eventCount + 1 , timeout = 60 )
102102
103103 def test_submit_via_attached_socket (self ):
104104 eventCount = int (self .index ['totalEventCount' ])
105105 f = self .index .attached_socket
106106 with f () as sock :
107107 sock .send ('Hello world!\r \n ' )
108- self .assertEventuallyTrue (lambda : self .totalEventCount == eventCount + 1 )
108+ self .assertEventuallyTrue (lambda : self .totalEventCount () == eventCount + 1 , timeout = 60 )
109109
110110 def test_upload (self ):
111111 self .installAppFromCollection ("file_to_upload" )
@@ -114,7 +114,7 @@ def test_upload(self):
114114
115115 path = self .pathInApp ("file_to_upload" , ["log.txt" ])
116116 self .index .upload (path )
117- self .assertEventuallyTrue (lambda : self .totalEventCount == eventCount + 4 )
117+ self .assertEventuallyTrue (lambda : self .totalEventCount () == eventCount + 4 , timeout = 60 )
118118
119119if __name__ == "__main__" :
120120 import unittest
0 commit comments