mirror of https://github.com/facebook/rocksdb.git
Fix DefaultEnvTest.incBackgroundThreadsIfNeeded test (#5021)
Summary: `DefaultEnvTest.incBackgroundThreadsIfNeeded` jtest should assert that the number of threads is greater than or equal to the minimum number of threads. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5021 Differential Revision: D14268311 Pulled By: sagar0 fbshipit-source-id: 01fb32b5b3ce636451d162fa1a2bbc5bd1974682
This commit is contained in:
parent
f83eecff99
commit
06ea73d60b
|
@ -54,13 +54,13 @@ public class DefaultEnvTest {
|
|||
public void incBackgroundThreadsIfNeeded() {
|
||||
try (final Env defaultEnv = RocksEnv.getDefault()) {
|
||||
defaultEnv.incBackgroundThreadsIfNeeded(20, Priority.BOTTOM);
|
||||
assertThat(defaultEnv.getBackgroundThreads(Priority.BOTTOM)).isEqualTo(20);
|
||||
assertThat(defaultEnv.getBackgroundThreads(Priority.BOTTOM)).isGreaterThanOrEqualTo(20);
|
||||
|
||||
defaultEnv.incBackgroundThreadsIfNeeded(20, Priority.LOW);
|
||||
assertThat(defaultEnv.getBackgroundThreads(Priority.LOW)).isEqualTo(20);
|
||||
assertThat(defaultEnv.getBackgroundThreads(Priority.LOW)).isGreaterThanOrEqualTo(20);
|
||||
|
||||
defaultEnv.incBackgroundThreadsIfNeeded(20, Priority.HIGH);
|
||||
assertThat(defaultEnv.getBackgroundThreads(Priority.HIGH)).isEqualTo(20);
|
||||
assertThat(defaultEnv.getBackgroundThreads(Priority.HIGH)).isGreaterThanOrEqualTo(20);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue