Ran make format
This commit is contained in:
parent
652d3580d4
commit
badf20081a
@ -45,7 +45,6 @@ public class MemoryUtilTest {
|
|||||||
new FlushOptions().setWaitForFlush(true);
|
new FlushOptions().setWaitForFlush(true);
|
||||||
final RocksDB db =
|
final RocksDB db =
|
||||||
RocksDB.open(options, dbFolder1.getRoot().getAbsolutePath())) {
|
RocksDB.open(options, dbFolder1.getRoot().getAbsolutePath())) {
|
||||||
|
|
||||||
final List<RocksDB> dbs = new ArrayList<>(1);
|
final List<RocksDB> dbs = new ArrayList<>(1);
|
||||||
dbs.add(db);
|
dbs.add(db);
|
||||||
final Set<Cache> caches = new HashSet<>(1);
|
final Set<Cache> caches = new HashSet<>(1);
|
||||||
@ -129,7 +128,8 @@ public class MemoryUtilTest {
|
|||||||
db.get(key);
|
db.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Map<MemoryUsageType, Long> usage = MemoryUtil.getApproximateMemoryUsageByType(dbs, caches);
|
final Map<MemoryUsageType, Long> usage =
|
||||||
|
MemoryUtil.getApproximateMemoryUsageByType(dbs, caches);
|
||||||
assertThat(usage.get(MemoryUsageType.kMemTableTotal)).isEqualTo(
|
assertThat(usage.get(MemoryUsageType.kMemTableTotal)).isEqualTo(
|
||||||
db1.getAggregatedLongProperty(MEMTABLE_SIZE) + db2.getAggregatedLongProperty(MEMTABLE_SIZE));
|
db1.getAggregatedLongProperty(MEMTABLE_SIZE) + db2.getAggregatedLongProperty(MEMTABLE_SIZE));
|
||||||
assertThat(usage.get(MemoryUsageType.kMemTableUnFlushed)).isEqualTo(
|
assertThat(usage.get(MemoryUsageType.kMemTableUnFlushed)).isEqualTo(
|
||||||
|
@ -79,8 +79,8 @@ public class TestUtil {
|
|||||||
*
|
*
|
||||||
* @return the random int
|
* @return the random int
|
||||||
*/
|
*/
|
||||||
public static int intBetween(final Random random, final int minInclusive,
|
public static int intBetween(
|
||||||
final int maxInclusive) {
|
final Random random, final int minInclusive, final int maxInclusive) {
|
||||||
return random.nextInt((maxInclusive - minInclusive) + 1) + minInclusive;
|
return random.nextInt((maxInclusive - minInclusive) + 1) + minInclusive;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user