add setMaxTableFilesSize Options unit test

This commit is contained in:
Jesper Lundgren 2015-06-20 16:24:09 +08:00
parent d62b6ed838
commit dda74111ae
2 changed files with 38 additions and 0 deletions

View File

@ -723,4 +723,23 @@ public class ColumnFamilyOptionsTest {
} }
} }
} }
@Test
public void maxTableFilesSizeFIFO() {
ColumnFamilyOptions opt = null;
try {
opt = new ColumnFamilyOptions();
long longValue = rand.nextLong();
// Size has to be positive
longValue = (longValue < 0) ? -longValue : longValue;
longValue = (longValue == 0) ? longValue + 1 : longValue;
opt.setMaxTableFilesSizeFIFO(longValue);
assertThat(opt.maxTableFilesSizeFIFO()).
isEqualTo(longValue);
} finally {
if (opt != null) {
opt.dispose();
}
}
}
} }

View File

@ -1108,6 +1108,25 @@ public class OptionsTest {
} }
} }
@Test
public void maxTableFilesSizeFIFO() {
Options opt = null;
try {
opt = new Options();
long longValue = rand.nextLong();
// Size has to be positive
longValue = (longValue < 0) ? -longValue : longValue;
longValue = (longValue == 0) ? longValue + 1 : longValue;
opt.setMaxTableFilesSizeFIFO(longValue);
assertThat(opt.maxTableFilesSizeFIFO()).
isEqualTo(longValue);
} finally {
if (opt != null) {
opt.dispose();
}
}
}
@Test @Test
public void rateLimiterConfig() { public void rateLimiterConfig() {
Options options = null; Options options = null;