File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
tests/objectbox-java-test/src/test/java/io/objectbox Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -150,15 +150,17 @@ private void assertThrowsStoreIsClosed(ThrowingRunnable runnable) {
150
150
assertEquals ("Store is closed" , ex .getMessage ());
151
151
}
152
152
153
- @ Test (expected = DbException .class )
154
- public void testPreventTwoBoxStoresWithSameFileOpenend () {
155
- createBoxStore ();
153
+ @ Test
154
+ public void openSamePath_fails () {
155
+ DbException ex = assertThrows (DbException .class , this ::createBoxStore );
156
+ assertTrue (ex .getMessage ().contains ("Another BoxStore is still open for this directory" ));
156
157
}
157
158
158
159
@ Test
159
- public void testOpenSameBoxStoreAfterClose () {
160
+ public void openSamePath_afterClose_works () {
160
161
store .close ();
161
- createBoxStore ();
162
+ BoxStore store2 = createBoxStore ();
163
+ store2 .close ();
162
164
}
163
165
164
166
@ Test
You can’t perform that action at this time.
0 commit comments