test.setName("SoftDeleteBatchQueryBuilderTest");
context.commitChanges();
final SelectQuery query = new SelectQuery(SoftTest.class);
new ThreadedTestHelper() {
@Override
protected void assertResult() throws Exception {
query.setQualifier(ExpressionFactory.matchExp("name", test.getName()));
assertEquals(1, context.performQuery(query).size());
query.andQualifier(ExpressionFactory.matchDbExp("DELETED", true));
assertEquals(0, context.performQuery(query).size());
}
}.assertWithTimeout(200);
context.deleteObject(test);
assertEquals(test.getPersistenceState(), PersistenceState.DELETED);
context.commitChanges();
new ThreadedTestHelper() {
@Override
protected void assertResult() throws Exception {
query.setQualifier(ExpressionFactory.matchExp("name", test.getName()));
assertEquals(0, context.performQuery(query).size());