File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -190,11 +190,18 @@ def test_optional_match(self):
190190 def test_cached_execution (self ):
191191 redis_graph = Graph ('cached' , self .r )
192192 redis_graph .query ("CREATE ()" )
193+
193194 uncached_result = redis_graph .query ("MATCH (n) RETURN n" )
194- cached_result = redis_graph .query ("MATCH (n) RETURN n" )
195- self .assertEqual (uncached_result .result_set , cached_result .result_set )
196195 self .assertFalse (uncached_result .cached_execution )
196+
197+ # loop to make sure the query is cached on each thread on server
198+ for x in range (0 , 32 ):
199+ cached_result = redis_graph .query ("MATCH (n) RETURN n" )
200+ self .assertEqual (uncached_result .result_set , cached_result .result_set )
201+
202+ # should be cached on all threads by now
197203 self .assertTrue (cached_result .cached_execution )
204+
198205 redis_graph .delete ()
199206
200207if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments