Changeset 6355

Show
Ignore:
Timestamp:
11/18/08 18:07:45 (2 months ago)
Author:
morris
Message:

Fix threading issues in test

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libwired/test/tests/wi-fsevents-tests.c

    r6146 r6355  
    8585        wi_release(wi_test_fsevents_lock); 
    8686        wi_release(wi_test_fsevents_fsevents); 
     87        wi_release(wi_test_fsevents_path); 
    8788#endif 
    8889} 
     
    9394 
    9495static void wi_test_fsevents_thread(wi_runtime_instance_t *instance) { 
     96        wi_pool_t               *pool; 
     97         
     98        pool = wi_string_init(wi_string_alloc()); 
     99         
    95100        if(!wi_fsevents_run_with_timeout(wi_test_fsevents_fsevents, 1.0)) 
    96                 WI_TEST_FAIL("%m"); 
     101                wi_log_warn(WI_STR("wi_fsevents_run_with_timeout: %m")); 
    97102         
    98103        wi_condition_lock_lock(wi_test_fsevents_lock); 
    99104        wi_condition_lock_unlock_with_condition(wi_test_fsevents_lock, 1); 
     105         
     106        wi_release(pool); 
    100107} 
    101108 
     
    105112        wi_condition_lock_lock(wi_test_fsevents_lock); 
    106113        wi_test_fsevents_path = wi_retain(path); 
    107         wi_condition_lock_unlock_with_condition(wi_test_fsevents_lock, 1); 
     114        wi_condition_lock_unlock(wi_test_fsevents_lock); 
    108115} 
    109116