1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
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).
10 import static org
.assertj
.core
.api
.Assertions
.assertThat
;
12 public class FlushOptionsTest
{
15 public void waitForFlush() {
16 try (final FlushOptions flushOptions
= new FlushOptions()) {
17 assertThat(flushOptions
.waitForFlush()).isTrue();
18 flushOptions
.setWaitForFlush(false);
19 assertThat(flushOptions
.waitForFlush()).isFalse();
24 public void allowWriteStall() {
25 try (final FlushOptions flushOptions
= new FlushOptions()) {
26 assertThat(flushOptions
.allowWriteStall()).isFalse();
27 flushOptions
.setAllowWriteStall(true);
28 assertThat(flushOptions
.allowWriteStall()).isTrue();