]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
11fdf7f2 TL |
2 | // This source code is licensed under both the GPLv2 (found in the |
3 | // COPYING file in the root directory) and Apache 2.0 License | |
4 | // (found in the LICENSE.Apache file in the root directory). | |
7c673cae FG |
5 | |
6 | package org.rocksdb; | |
7 | ||
8 | import org.junit.ClassRule; | |
9 | import org.junit.Test; | |
10 | ||
11 | import static org.assertj.core.api.Assertions.assertThat; | |
12 | ||
13 | public class ComparatorOptionsTest { | |
14 | ||
15 | @ClassRule | |
16 | public static final RocksMemoryResource rocksMemoryResource = | |
17 | new RocksMemoryResource(); | |
18 | ||
19 | @Test | |
20 | public void comparatorOptions() { | |
21 | try(final ComparatorOptions copt = new ComparatorOptions()) { | |
22 | ||
23 | assertThat(copt).isNotNull(); | |
24 | // UseAdaptiveMutex test | |
25 | copt.setUseAdaptiveMutex(true); | |
26 | assertThat(copt.useAdaptiveMutex()).isTrue(); | |
27 | ||
28 | copt.setUseAdaptiveMutex(false); | |
29 | assertThat(copt.useAdaptiveMutex()).isFalse(); | |
30 | } | |
31 | } | |
32 | } |