Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public void begin() throws RepositoryException {

@Override
public void begin(IsolationLevel level) throws RepositoryException {
super.begin(level);
try {
// always call receiveTransactionSettings(...) before calling begin();
sailConnection.setTransactionSettings(new TransactionSetting[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.rdf4j.repository.sail;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.eq;
Expand All @@ -20,6 +21,7 @@
import java.util.Optional;

import org.eclipse.rdf4j.common.iteration.EmptyIteration;
import org.eclipse.rdf4j.common.transaction.IsolationLevels;
import org.eclipse.rdf4j.query.BooleanQuery;
import org.eclipse.rdf4j.query.GraphQuery;
import org.eclipse.rdf4j.query.Query;
Expand Down Expand Up @@ -148,4 +150,11 @@ public void testPrepareBooleanQuery_bypassed() throws Exception {
verify(sailConnection).evaluate(eq(expr), any(), any(), anyBoolean());
}

@Test
public void testIsolationLevelIsSet() throws Exception {
IsolationLevels isolationLevel = IsolationLevels.SERIALIZABLE;
subject.begin(isolationLevel);
assertThat(subject.getIsolationLevel()).isEqualTo(isolationLevel);
}

}