Skip to content

Commit 45da054

Browse files
DbExceptionListener: test setting on closed store.
1 parent bf55acd commit 45da054

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/objectbox-java-test/src/test/java/io/objectbox/exception/ExceptionTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public void exceptionListener_null_works() {
4040
store.setDbExceptionListener(null);
4141
}
4242

43+
@Test
44+
public void exceptionListener_closedStore_works() {
45+
store.close();
46+
store.setDbExceptionListener(e -> System.out.println("This is never called"));
47+
}
48+
4349
@Test
4450
public void exceptionListener_removing_works() {
4551
AtomicBoolean replacedListenerCalled = new AtomicBoolean(false);

0 commit comments

Comments
 (0)