Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBL-6147: Add testConcurrentCreateAndQuery to verify query's lock #3321

Merged
merged 3 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enable testDatabaseChange and testDocumentChange
  • Loading branch information
velicuvlad committed Aug 9, 2024
commit 0e5cb7d429ab11faa90d5b7fd6df206894368d36
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
Loading