diff options
author | Oleksii Prudkyi <Oleksii.Prudkyi@gmail.com> | 2017-10-29 20:17:42 +0200 |
---|---|---|
committer | James E. King, III <jking@apache.org> | 2017-10-30 15:12:16 -0400 |
commit | a533ea1615e9df935e77b99440cf264c6b417e3e (patch) | |
tree | 5139ec673bdcfa2c710ecf6cc1e6c398958e52c2 | |
parent | ac11cf88f852789d699415ec0c2c0e26bfd71ec2 (diff) | |
download | thrift-a533ea1615e9df935e77b99440cf264c6b417e3e.tar.gz |
THRIFT-4377: more informative error messages on tests
THRIFT-4377: fix haxe-php integration
Client: haxe
This closes #1407
-rw-r--r-- | lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx | 2 | ||||
-rw-r--r-- | test/haxe/src/TestClient.hx | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx b/lib/haxe/src/org/apache/thrift/server/TSimpleServer.hx index 655a629df..0600744d3 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(); } diff --git a/test/haxe/src/TestClient.hx b/test/haxe/src/TestClient.hx index 9f0249960..853319e23 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'); |