Code example for ConditionVariable

Methods: block

0
 
public final class SettingsTests extends AndroidTestCase {
 
    @SmallTest @MediumTest @LargeTest 
    public void testGetExecutor() { 
        final ConditionVariable condition = new ConditionVariable();
 
        Settings.getExecutor().execute(new Runnable() {
            @Override 
            public void run() { 
                condition.open();
            } 
        }); 
 
        boolean success = condition.block(5000);
        assertTrue(success);
    } 
 
    @SmallTest @MediumTest @LargeTest 
    public void testSetExecutor() { 
        final ConditionVariable condition = new ConditionVariable();