pEpObjCTests/PEPPassphraseCacheTest.m
branchIOSAD-172
changeset 1480 b998c63a4cb6
parent 1474 a37a548a6b3b
child 1542 c68371dfc71e
     1.1 --- a/pEpObjCTests/PEPPassphraseCacheTest.m	Fri Jun 26 16:54:34 2020 +0200
     1.2 +++ b/pEpObjCTests/PEPPassphraseCacheTest.m	Fri Jun 26 16:54:34 2020 +0200
     1.3 @@ -89,10 +89,10 @@
     1.4  
     1.5  - (void)testTimeout
     1.6  {
     1.7 -    NSTimeInterval timeout = 0.5;
     1.8 +    NSTimeInterval timeout = 0.2;
     1.9      PEPPassphraseCache *ownCache = [[PEPPassphraseCache alloc]
    1.10                                      initWithPassphraseTimeout:timeout
    1.11 -                                    checkExpiryInterval:timeout];
    1.12 +                                    checkExpiryInterval:timeout/2];
    1.13  
    1.14      NSString *ownPassphrase = @"blah";
    1.15      [ownCache addPassphrase:ownPassphrase];
    1.16 @@ -100,7 +100,7 @@
    1.17      NSArray *expectedBefore = @[@"", ownPassphrase];
    1.18      XCTAssertEqualObjects(ownCache.passphrases, expectedBefore);
    1.19  
    1.20 -    [NSThread sleepForTimeInterval:3*timeout];
    1.21 +    [NSThread sleepForTimeInterval:2*timeout];
    1.22      XCTAssertEqualObjects(ownCache.passphrases, @[@""]);
    1.23  }
    1.24