HBASE-27479 fix flaky test testClone in TestTaskMonitor (#4876)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
YiweiLi4 2022-11-17 07:10:53 -06:00 committed by GitHub
parent 07a3ffdd97
commit a2075f51a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -333,6 +333,11 @@
<artifactId>bcpkix-jdk15on</artifactId> <artifactId>bcpkix-jdk15on</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<!-- Make sure resources get added before they are processed by placing this first <!-- Make sure resources get added before they are processed by placing this first

View File

@ -38,6 +38,7 @@ import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.junit.ClassRule; import org.junit.ClassRule;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category; import org.junit.experimental.categories.Category;
import org.skyscreamer.jsonassert.JSONAssert;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -238,7 +239,7 @@ public class TestTaskMonitor {
assertEquals(clone.getStatus(), monitor.getStatus()); assertEquals(clone.getStatus(), monitor.getStatus());
assertEquals(clone.toString(), monitor.toString()); assertEquals(clone.toString(), monitor.toString());
assertEquals(clone.toMap(), monitor.toMap()); assertEquals(clone.toMap(), monitor.toMap());
assertEquals(clone.toJSON(), monitor.toJSON()); JSONAssert.assertEquals(clone.toJSON(), monitor.toJSON(), true);
// mark complete and make param dirty // mark complete and make param dirty
monitor.markComplete("complete RPC"); monitor.markComplete("complete RPC");

View File

@ -827,6 +827,7 @@
<jcodings.version>1.0.56</jcodings.version> <jcodings.version>1.0.56</jcodings.version>
<spy.version>2.12.2</spy.version> <spy.version>2.12.2</spy.version>
<bouncycastle.version>1.70</bouncycastle.version> <bouncycastle.version>1.70</bouncycastle.version>
<skyscreamer.version>1.5.1</skyscreamer.version>
<kerby.version>1.0.1</kerby.version> <kerby.version>1.0.1</kerby.version>
<commons-crypto.version>1.1.0</commons-crypto.version> <commons-crypto.version>1.1.0</commons-crypto.version>
<curator.version>4.2.0</curator.version> <curator.version>4.2.0</curator.version>
@ -1570,6 +1571,12 @@
<version>${bouncycastle.version}</version> <version>${bouncycastle.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>${skyscreamer.version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.bouncycastle</groupId> <groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId> <artifactId>bcpkix-jdk15on</artifactId>