You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2017/10/30 19:12:59 UTC

thrift git commit: THRIFT-4377: more informative error messages on tests THRIFT-4377: fix haxe-php integration Client: haxe

Repository: thrift
Updated Branches:
  refs/heads/master ac11cf88f -> a533ea161


THRIFT-4377: more informative error messages on tests
THRIFT-4377: fix haxe-php integration
Client: haxe

This closes #1407


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/a533ea16
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/a533ea16
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/a533ea16

Branch: refs/heads/master
Commit: a533ea1615e9df935e77b99440cf264c6b417e3e
Parents: ac11cf8
Author: Oleksii Prudkyi <Ol...@gmail.com>
Authored: Sun Oct 29 20:17:42 2017 +0200
Committer: James E. King, III <jk...@apache.org>
Committed: Mon Oct 30 15:12:16 2017 -0400

----------------------------------------------------------------------
 lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx |  2 +-
 test/haxe/src/TestClient.hx                            | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/a533ea16/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx
----------------------------------------------------------------------
diff --git a/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx b/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx
index 655a629..0600744 100644
--- a/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx
+++ b/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx
@@ -121,7 +121,7 @@ class TSimpleServer extends TServer  {
                 logDelegate(e); // Unexpected
             }
 
-            if(client != null)
+            if(client != null && !runOnce)
             {
                 client.close();
             }

http://git-wip-us.apache.org/repos/asf/thrift/blob/a533ea16/test/haxe/src/TestClient.hx
----------------------------------------------------------------------
diff --git a/test/haxe/src/TestClient.hx b/test/haxe/src/TestClient.hx
index 9f02499..853319e 100644
--- a/test/haxe/src/TestClient.hx
+++ b/test/haxe/src/TestClient.hx
@@ -444,6 +444,10 @@ class TestClient {
             rslt.Expect( e.message == "Xception", 'testException("Xception")  -  e.message == "Xception"');
             rslt.Expect( e.errorCode == 1001, 'testException("Xception")  -  e.errorCode == 1001');
         }
+        catch (e : TException)
+        {
+            rslt.Expect( false, 'testException("Xception")  -  ${e} : ${e.errorMsg}');
+        }
         catch (e : Dynamic)
         {
             rslt.Expect( false, 'testException("Xception")  -  $e');
@@ -457,7 +461,7 @@ class TestClient {
         }
         catch (e : TException)
         {
-            rslt.Expect( true, 'testException("TException")  -  $e');
+            rslt.Expect( true, 'testException("TException")  -  $e : ${e.errorMsg}');
         }
         catch (e : Dynamic)
         {
@@ -475,6 +479,10 @@ class TestClient {
             client.testException("bla");
             rslt.Expect( true, 'testException("bla") should not throw');
         }
+        catch (e : TException)
+        {
+            rslt.Expect( false, 'testException("bla")  -  ${e} : ${e.errorMsg}');
+        }
         catch (e : Dynamic)
         {
             rslt.Expect( false, 'testException("bla")  -  $e');