summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJiayu Liu <Jimexist@users.noreply.github.com>2022-10-09 08:49:29 +0800
committerGitHub <noreply@github.com>2022-10-09 08:49:29 +0800
commitd21e95a88f38d155dbb5da858b2f0391d72a7e2e (patch)
tree5ce0e071c57920e58b529258e96caad75653b88b /lib
parentbe0fab1815d5754e0a60acbdea933c8b36177764 (diff)
downloadthrift-d21e95a88f38d155dbb5da858b2f0391d72a7e2e.tar.gz
THRIFT-5649: add github action for go (#2697)
Diffstat (limited to 'lib')
-rw-r--r--lib/java/src/test/java/org/apache/thrift/server/ServerTestBase.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/java/src/test/java/org/apache/thrift/server/ServerTestBase.java b/lib/java/src/test/java/org/apache/thrift/server/ServerTestBase.java
index 6657df6cc..84a98a6c0 100644
--- a/lib/java/src/test/java/org/apache/thrift/server/ServerTestBase.java
+++ b/lib/java/src/test/java/org/apache/thrift/server/ServerTestBase.java
@@ -19,6 +19,7 @@
package org.apache.thrift.server;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.nio.ByteBuffer;
@@ -344,9 +345,9 @@ public abstract class ServerTestBase {
private void testBool(ThriftTest.Client testClient) throws TException {
boolean t = testClient.testBool(true);
- assertEquals(true, t);
+ assertTrue(t);
boolean f = testClient.testBool(false);
- assertEquals(false, f);
+ assertFalse(f);
}
private void testByte(ThriftTest.Client testClient) throws TException {
@@ -354,6 +355,12 @@ public abstract class ServerTestBase {
assertEquals(1, i8);
}
+ private void testUuid(ThriftTest.Client testClient) throws TException {
+ UUID uuid = UUID.fromString("00112233-4455-6677-8899-aabbccddeeff");
+ UUID got = testClient.testUuid(uuid);
+ assertEquals(uuid, got);
+ }
+
private void testDouble(ThriftTest.Client testClient) throws TException {
double dub = testClient.testDouble(5.325098235);
assertEquals(5.325098235, dub);
@@ -469,6 +476,7 @@ public abstract class ServerTestBase {
testStruct(testClient);
testNestedStruct(testClient);
testMap(testClient);
+ testUuid(testClient);
testStringMap(testClient);
testSet(testClient);
testList(testClient);