From 06ea73d60bcd78dc9047bffe669ab409e5cca8ed Mon Sep 17 00:00:00 2001 From: Sagar Vemuri Date: Thu, 28 Feb 2019 14:43:55 -0800 Subject: [PATCH] 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 --- java/src/test/java/org/rocksdb/DefaultEnvTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/test/java/org/rocksdb/DefaultEnvTest.java b/java/src/test/java/org/rocksdb/DefaultEnvTest.java index a9cd0c0219..9e4f043871 100644 --- a/java/src/test/java/org/rocksdb/DefaultEnvTest.java +++ b/java/src/test/java/org/rocksdb/DefaultEnvTest.java @@ -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); } }