File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -229,11 +229,19 @@ class TestModel < TestBaseModel
229229  end 
230230
231231  it  "should safely close cursors in threaded environment"  do 
232-     expect  { 
233-       t1  =  Thread . new  {  plsql . dbms_lock . sleep ( 1 )  } . tap  {  |t | t . abort_on_exception  =  true  } 
234-       t2  =  Thread . new  {  plsql . dbms_lock . sleep ( 2 )  } . tap  {  |t | t . abort_on_exception  =  true  } 
235-       [ t2 ,  t1 ] . each  {  |t | t . join  } 
236-     } . not_to  raise_error 
232+     if  ( plsql . connection . database_version  <=> [ 18 ,  0 ,  0 ,  0 ] )  >= 0 
233+       expect  { 
234+         t1  =  Thread . new  {  plsql . dbms_session . sleep ( 1 )  } . tap  {  |t | t . abort_on_exception  =  true  } 
235+         t2  =  Thread . new  {  plsql . dbms_session . sleep ( 2 )  } . tap  {  |t | t . abort_on_exception  =  true  } 
236+         [ t2 ,  t1 ] . each  {  |t | t . join  } 
237+       } . not_to  raise_error 
238+     else 
239+       expect  { 
240+         t1  =  Thread . new  {  plsql . dbms_lock . sleep ( 1 )  } . tap  {  |t | t . abort_on_exception  =  true  } 
241+         t2  =  Thread . new  {  plsql . dbms_lock . sleep ( 2 )  } . tap  {  |t | t . abort_on_exception  =  true  } 
242+         [ t2 ,  t1 ] . each  {  |t | t . join  } 
243+       } . not_to  raise_error 
244+     end 
237245  end 
238246
239247end  if  defined? ( ActiveRecord ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments