File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
tests/objectbox-java-test/src/test/java/io/objectbox Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package io .objectbox ;
18
18
19
+ import io .objectbox .exception .DbException ;
19
20
import org .junit .Test ;
20
21
21
22
import java .io .File ;
22
- import java .util .Locale ;
23
23
import java .util .concurrent .Callable ;
24
24
25
- import javax .annotation .Nullable ;
26
-
27
- import io .objectbox .exception .DbException ;
28
-
29
- import static org .junit .Assert .*;
25
+ import static org .junit .Assert .assertEquals ;
26
+ import static org .junit .Assert .assertFalse ;
27
+ import static org .junit .Assert .assertNotNull ;
28
+ import static org .junit .Assert .assertNotSame ;
29
+ import static org .junit .Assert .assertSame ;
30
+ import static org .junit .Assert .assertTrue ;
31
+ import static org .junit .Assert .fail ;
30
32
31
33
public class BoxStoreTest extends AbstractObjectBoxTest {
32
34
@@ -126,7 +128,11 @@ public void testDeleteAllFiles_baseDirName() {
126
128
closeStoreForTest ();
127
129
File basedir = new File ("test-base-dir" );
128
130
String name = "mydb" ;
129
- basedir .mkdir ();
131
+ if (!basedir .exists ()) {
132
+ if (!basedir .mkdir ()) {
133
+ fail ("Failed to create test directory." );
134
+ }
135
+ }
130
136
assertTrue (basedir .isDirectory ());
131
137
File dbDir = new File (basedir , name );
132
138
assertFalse (dbDir .exists ());
You can’t perform that action at this time.
0 commit comments