THRIFT-3347 Improve cross test servers and clients
Client: TestSuite, C++, Perl, NodeJS, c_glib, Haskell, Python
Patch: Nobuaki Sukegawa <nsukeg@gmail.com>
This closes #621
diff --git a/test/perl/TestClient.pl b/test/perl/TestClient.pl
index 40f8f59..9d4aab2 100755
--- a/test/perl/TestClient.pl
+++ b/test/perl/TestClient.pl
@@ -136,11 +136,11 @@
# BOOL TEST
#
print("testBool(1)");
-my $u8 = $testClient->testBool(1);
-print(" = $u8\n");
+my $t = $testClient->testBool(1);
+print(" = $t\n");
print("testBool(0)");
-my $u8 = $testClient->testBool(0);
-print(" = $u8\n");
+my $f = $testClient->testBool(0);
+print(" = $f\n");
#
@@ -321,11 +321,17 @@
my $insane = new ThriftTest::Insanity();
$insane->{userMap}->{ThriftTest::Numberz::FIVE} = 5000;
my $truck = new ThriftTest::Xtruct();
-$truck->string_thing("Truck");
-$truck->byte_thing(8);
-$truck->i32_thing(8);
-$truck->i64_thing(8);
+$truck->string_thing("Hello2");
+$truck->byte_thing(2);
+$truck->i32_thing(2);
+$truck->i64_thing(2);
+my $truck2 = new ThriftTest::Xtruct();
+$truck2->string_thing("Goodbye4");
+$truck2->byte_thing(4);
+$truck2->i32_thing(4);
+$truck2->i64_thing(4);
push(@{$insane->{xtructs}}, $truck);
+push(@{$insane->{xtructs}}, $truck2);
print("testInsanity()");
my $whoa = $testClient->testInsanity($insane);
diff --git a/test/perl/TestServer.pl b/test/perl/TestServer.pl
index eebebc8..5bfa640 100644
--- a/test/perl/TestServer.pl
+++ b/test/perl/TestServer.pl
@@ -328,8 +328,8 @@
my @goodbyes;
push(@goodbyes, $goodbye);
my $crazy = new ThriftTest::Insanity({userMap => { ThriftTest::Numberz::EIGHT => 8 }, xtructs => \@goodbyes});
- my $loony = new ThriftTest::Insanity({userMap => { ThriftTest::Numberz::FIVE => 5 }, xtructs => \@hellos});
- my $result = { 1 => { ThriftTest::Numberz::TWO => $crazy, ThriftTest::Numberz::THREE => $crazy },
+ my $loony = new ThriftTest::Insanity();
+ my $result = { 1 => { ThriftTest::Numberz::TWO => $argument, ThriftTest::Numberz::THREE => $argument },
2 => { ThriftTest::Numberz::SIX => $loony } };
return $result;
}