Skip to content

Commit

Permalink
enable testDatabaseChange and testDocumentChange
Browse files Browse the repository at this point in the history
  • Loading branch information
velicuvlad committed Aug 9, 2024
1 parent ddb7239 commit 0e5cb7d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Objective-C/Tests/ConcurrentTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ - (void) testConcurrentCompact {
}];
}

#if 0
- (void) testDatabaseChange {
XCTestExpectation* exp1 = [self expectationWithDescription: @"Create"];
XCTestExpectation* exp2 = [self expectationWithDescription: @"Change"];
Expand All @@ -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"];
Expand All @@ -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;
Expand Down

0 comments on commit 0e5cb7d

Please sign in to comment.