From 0e5cb7d429ab11faa90d5b7fd6df206894368d36 Mon Sep 17 00:00:00 2001 From: Vlad Velicu Date: Thu, 8 Aug 2024 15:28:53 +0100 Subject: [PATCH] enable testDatabaseChange and testDocumentChange --- Objective-C/Tests/ConcurrentTest.m | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Objective-C/Tests/ConcurrentTest.m b/Objective-C/Tests/ConcurrentTest.m index 3c47697a1..ac7b871e2 100644 --- a/Objective-C/Tests/ConcurrentTest.m +++ b/Objective-C/Tests/ConcurrentTest.m @@ -292,7 +292,6 @@ - (void) testConcurrentCompact { }]; } -#if 0 - (void) testDatabaseChange { XCTestExpectation* exp1 = [self expectationWithDescription: @"Create"]; XCTestExpectation* exp2 = [self expectationWithDescription: @"Change"]; @@ -302,15 +301,13 @@ - (void) testDatabaseChange { }]; [self concurrentRuns: 1 waitUntilDone: NO withBlock: ^(NSUInteger rIndex) { - [_db saveDocument: [[CBLMutableDocument alloc] initWithID: @"doc1"] error: nil]; + [self->_db saveDocument: [[CBLMutableDocument alloc] initWithID: @"doc1"] error: nil]; [exp1 fulfill]; }]; [self waitForExpectations: @[exp2] timeout: 10.0]; // Test deadlock } -#endif //TEMP -#if 0 //TEMP - (void) testDocumentChange { XCTestExpectation* exp1 = [self expectationWithDescription: @"Create"]; XCTestExpectation* exp2 = [self expectationWithDescription: @"Change"]; @@ -320,13 +317,12 @@ - (void) testDocumentChange { }]; [self concurrentRuns: 1 waitUntilDone: NO withBlock: ^(NSUInteger rIndex) { - [_db saveDocument: [[CBLMutableDocument alloc] initWithID: @"doc1"] error: nil]; + [self->_db saveDocument: [[CBLMutableDocument alloc] initWithID: @"doc1"] error: nil]; [exp1 fulfill]; }]; [self waitForExpectations: @[exp2] timeout: 10.0]; // Test deadlock } -#endif - (void) testConcurrentCreateAndQuery { NSError* outError;