Skip to content

Commit b5aea0f

Browse files
committed
remove mode from EnvTest
1 parent d976f91 commit b5aea0f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/test/java/org/lmdbjava/EnvTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class EnvTest {
4848
public void cannotInfoOnceClosed() throws IOException {
4949
final File path = tmp.newFile();
5050
final Env<ByteBuffer> env = create()
51-
.open(path, POSIX_MODE, MDB_NOSUBDIR);
51+
.open(path, MDB_NOSUBDIR);
5252
env.close();
5353
env.info();
5454
}
@@ -57,7 +57,7 @@ public void cannotInfoOnceClosed() throws IOException {
5757
public void cannotStatOnceClosed() throws IOException {
5858
final File path = tmp.newFile();
5959
final Env<ByteBuffer> env = create()
60-
.open(path, POSIX_MODE, MDB_NOSUBDIR);
60+
.open(path, MDB_NOSUBDIR);
6161
env.close();
6262
env.stat();
6363
}
@@ -66,7 +66,7 @@ public void cannotStatOnceClosed() throws IOException {
6666
public void cannotSyncOnceClosed() throws IOException {
6767
final File path = tmp.newFile();
6868
final Env<ByteBuffer> env = create()
69-
.open(path, POSIX_MODE, MDB_NOSUBDIR);
69+
.open(path, MDB_NOSUBDIR);
7070
env.close();
7171
env.sync(false);
7272
}
@@ -79,7 +79,7 @@ public void copy() throws IOException {
7979
assertThat(dest.isDirectory(), is(true));
8080
assertThat(dest.list().length, is(0));
8181
final File src = tmp.newFolder();
82-
try (final Env<ByteBuffer> env = create().open(src, POSIX_MODE)) {
82+
try (final Env<ByteBuffer> env = create().open(src)) {
8383
env.copy(dest, MDB_CP_COMPACT);
8484
assertThat(dest.list().length, is(1));
8585
}
@@ -89,7 +89,7 @@ public void copy() throws IOException {
8989
public void copyRejectsFileDestination() throws IOException {
9090
final File dest = tmp.newFile();
9191
final File src = tmp.newFolder();
92-
try (final Env<ByteBuffer> env = create().open(src, POSIX_MODE)) {
92+
try (final Env<ByteBuffer> env = create().open(src)) {
9393
env.copy(dest, MDB_CP_COMPACT);
9494
}
9595
}
@@ -99,7 +99,7 @@ public void copyRejectsMissingDestination() throws IOException {
9999
final File dest = tmp.newFolder();
100100
dest.delete();
101101
final File src = tmp.newFolder();
102-
try (final Env<ByteBuffer> env = create().open(src, POSIX_MODE)) {
102+
try (final Env<ByteBuffer> env = create().open(src)) {
103103
env.copy(dest, MDB_CP_COMPACT);
104104
}
105105
}
@@ -110,15 +110,15 @@ public void copyRejectsNonEmptyDestination() throws IOException {
110110
final File subDir = new File(dest, "hello");
111111
subDir.mkdir();
112112
final File src = tmp.newFolder();
113-
try (final Env<ByteBuffer> env = create().open(src, POSIX_MODE)) {
113+
try (final Env<ByteBuffer> env = create().open(src)) {
114114
env.copy(dest, MDB_CP_COMPACT);
115115
}
116116
}
117117

118118
@Test
119119
public void createAsDirectory() throws IOException {
120120
final File path = tmp.newFolder();
121-
final Env<ByteBuffer> env = create().open(path, POSIX_MODE);
121+
final Env<ByteBuffer> env = create().open(path);
122122
assertThat(env.isOpen(), is(true));
123123
assertThat(path.isDirectory(), is(true));
124124
env.sync(false);
@@ -134,7 +134,7 @@ public void createAsFile() throws IOException {
134134
.setMapSize(1_024 * 1_024)
135135
.setMaxDbs(1)
136136
.setMaxReaders(1)
137-
.open(path, POSIX_MODE, MDB_NOSUBDIR)) {
137+
.open(path, MDB_NOSUBDIR)) {
138138
env.sync(true);
139139
assertThat(env.isOpen(), is(true));
140140
assertThat(path.isFile(), is(true));
@@ -147,7 +147,7 @@ public void info() throws IOException {
147147
final Env<ByteBuffer> env = create()
148148
.setMaxReaders(4)
149149
.setMapSize(123_456)
150-
.open(path, POSIX_MODE, MDB_NOSUBDIR);
150+
.open(path, MDB_NOSUBDIR);
151151
EnvInfo info = env.info();
152152
assertThat(info, is(notNullValue()));
153153
assertThat(info.lastPageNumber, is(1L));
@@ -163,7 +163,7 @@ public void byteUnit() throws IOException {
163163
final File path = tmp.newFile();
164164
final Env<ByteBuffer> env = create()
165165
.setMapSize(1, ByteUnit.MEBIBYTES)
166-
.open(path, POSIX_MODE, MDB_NOSUBDIR);
166+
.open(path, MDB_NOSUBDIR);
167167
EnvInfo info = env.info();
168168
assertThat(info.mapSize, is(ByteUnit.MEBIBYTES.toBytes(1)));
169169
}
@@ -172,7 +172,7 @@ public void byteUnit() throws IOException {
172172
public void stats() throws IOException {
173173
final File path = tmp.newFile();
174174
final Env<ByteBuffer> env = create()
175-
.open(path, POSIX_MODE, MDB_NOSUBDIR);
175+
.open(path, MDB_NOSUBDIR);
176176
EnvStat stat = env.stat();
177177
assertThat(stat, is(notNullValue()));
178178
assertThat(stat.branchPages, is(0L));

0 commit comments

Comments
 (0)