Fix taosdemoTest2.py failure
This commit is contained in:
		
							parent
							
								
									0bdecedeaa
								
							
						
					
					
						commit
						01e47002ea
					
				| 
						 | 
					@ -35,6 +35,11 @@ class TDTestCase:
 | 
				
			||||||
        if(threadID == 1):
 | 
					        if(threadID == 1):
 | 
				
			||||||
            print("use test")
 | 
					            print("use test")
 | 
				
			||||||
            tdSql.execute("use test")            
 | 
					            tdSql.execute("use test")            
 | 
				
			||||||
 | 
					            while True:
 | 
				
			||||||
 | 
					                tdSql.query("show tables")
 | 
				
			||||||
 | 
					                rows = tdSql.queryRows
 | 
				
			||||||
 | 
					                if(rows == 10):
 | 
				
			||||||
 | 
					                    break                    
 | 
				
			||||||
            while True:
 | 
					            while True:
 | 
				
			||||||
                print("query started")
 | 
					                print("query started")
 | 
				
			||||||
                tdSql.query("select * from test.t9")
 | 
					                tdSql.query("select * from test.t9")
 | 
				
			||||||
| 
						 | 
					@ -55,7 +60,6 @@ class TDTestCase:
 | 
				
			||||||
        t2 = threading.Thread(target=self.insertDataAndAlterTable, args=(1, ))
 | 
					        t2 = threading.Thread(target=self.insertDataAndAlterTable, args=(1, ))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        t1.start()        
 | 
					        t1.start()        
 | 
				
			||||||
        time.sleep(2)     
 | 
					 | 
				
			||||||
        t2.start()
 | 
					        t2.start()
 | 
				
			||||||
        t1.join()
 | 
					        t1.join()
 | 
				
			||||||
        t2.join()
 | 
					        t2.join()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue