]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/test/java/org/rocksdb/CompactionPriorityTest.java
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
10 import static org
.assertj
.core
.api
.Assertions
.assertThat
;
12 public class CompactionPriorityTest
{
14 @Test(expected
= IllegalArgumentException
.class)
15 public void failIfIllegalByteValueProvided() {
16 CompactionPriority
.getCompactionPriority((byte) -1);
20 public void getCompactionPriority() {
21 assertThat(CompactionPriority
.getCompactionPriority(
22 CompactionPriority
.OldestLargestSeqFirst
.getValue()))
23 .isEqualTo(CompactionPriority
.OldestLargestSeqFirst
);
27 public void valueOf() {
28 assertThat(CompactionPriority
.valueOf("OldestSmallestSeqFirst")).
29 isEqualTo(CompactionPriority
.OldestSmallestSeqFirst
);