You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2014/09/07 01:47:38 UTC

git commit: THRIFT-2694 Minor glitches in Delphi cross-test code Client: Delphi Patch: Jens Geyer

Repository: thrift
Updated Branches:
  refs/heads/master 1235ee3f2 -> 6bbbf1946


THRIFT-2694 Minor glitches in Delphi cross-test code
Client: Delphi
Patch: Jens Geyer


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

Branch: refs/heads/master
Commit: 6bbbf1946e55f91f063251679f479daab62e51df
Parents: 1235ee3
Author: Jens Geyer <je...@apache.org>
Authored: Sun Sep 7 01:45:56 2014 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Sun Sep 7 01:45:56 2014 +0200

----------------------------------------------------------------------
 lib/delphi/test/TestClient.pas | 11 ++++++++++-
 lib/delphi/test/client.dpr     |  1 +
 lib/delphi/test/server.dpr     |  1 +
 3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/6bbbf194/lib/delphi/test/TestClient.pas
----------------------------------------------------------------------
diff --git a/lib/delphi/test/TestClient.pas b/lib/delphi/test/TestClient.pas
index 9fb0b7a..5e4d91c 100644
--- a/lib/delphi/test/TestClient.pas
+++ b/lib/delphi/test/TestClient.pas
@@ -410,6 +410,11 @@ begin
       if FTransport.IsOpen then FTransport.Close;
       FTransport.Open;   // re-open connection, server has already closed
     end;
+    on e:TApplicationException do begin
+      Console.WriteLine( e.ClassName+' = '+e.Message); // this is what we get
+      if FTransport.IsOpen then FTransport.Close;
+      FTransport.Open;   // re-open connection, server has already closed
+    end;
     on e:TException do Expect( FALSE, 'Unexpected exception type "'+e.ClassName+'"');
     on e:Exception do Expect( FALSE, 'Unexpected exception type "'+e.ClassName+'"');
   end;
@@ -800,9 +805,11 @@ begin
     i := client.testMultiException( 'need more pizza', 'run out of beer');
     Expect( i.String_thing = 'run out of beer', 'i.String_thing = "' +i.String_thing+ '"');
     Expect( i.__isset_String_thing, 'i.__isset_String_thing = '+BoolToString(i.__isset_String_thing));
-    Expect( not i.__isset_Byte_thing, 'i.__isset_Byte_thing = '+BoolToString(i.__isset_Byte_thing));
+    { this is not necessarily true, these fields are default-serialized
+	Expect( not i.__isset_Byte_thing, 'i.__isset_Byte_thing = '+BoolToString(i.__isset_Byte_thing));
     Expect( not i.__isset_I32_thing, 'i.__isset_I32_thing = '+BoolToString(i.__isset_I32_thing));
     Expect( not i.__isset_I64_thing, 'i.__isset_I64_thing = '+BoolToString(i.__isset_I64_thing));
+	}
   except
     on e:Exception do Expect( FALSE, 'Unexpected exception "'+e.ClassName+'"');
   end;
@@ -832,9 +839,11 @@ begin
       Expect( x.ErrorCode = 2002, 'x.ErrorCode = '+IntToStr(x.ErrorCode));
       Expect( x.Struct_thing.String_thing = 'This is an Xception2', 'x.Struct_thing.String_thing = "'+x.Struct_thing.String_thing+'"');
       Expect( x.Struct_thing.__isset_String_thing, 'x.Struct_thing.__isset_String_thing = '+BoolToString(x.Struct_thing.__isset_String_thing));
+      { this is not necessarily true, these fields are default-serialized
       Expect( not x.Struct_thing.__isset_Byte_thing, 'x.Struct_thing.__isset_Byte_thing = '+BoolToString(x.Struct_thing.__isset_Byte_thing));
       Expect( not x.Struct_thing.__isset_I32_thing, 'x.Struct_thing.__isset_I32_thing = '+BoolToString(x.Struct_thing.__isset_I32_thing));
       Expect( not x.Struct_thing.__isset_I64_thing, 'x.Struct_thing.__isset_I64_thing = '+BoolToString(x.Struct_thing.__isset_I64_thing));
+	  }
     end;
     on e:Exception do Expect( FALSE, 'Unexpected exception "'+e.ClassName+'"');
   end;

http://git-wip-us.apache.org/repos/asf/thrift/blob/6bbbf194/lib/delphi/test/client.dpr
----------------------------------------------------------------------
diff --git a/lib/delphi/test/client.dpr b/lib/delphi/test/client.dpr
index 209e29d..dc576d9 100644
--- a/lib/delphi/test/client.dpr
+++ b/lib/delphi/test/client.dpr
@@ -35,6 +35,7 @@ uses
   Thrift.Server in '..\src\Thrift.Server.pas',
   Thrift.Stream in '..\src\Thrift.Stream.pas',
   Thrift.Console in '..\src\Thrift.Console.pas',
+  Thrift.TypeRegistry in '..\src\Thrift.TypeRegistry.pas',
   Thrift.Utils in '..\src\Thrift.Utils.pas';
 
 var

http://git-wip-us.apache.org/repos/asf/thrift/blob/6bbbf194/lib/delphi/test/server.dpr
----------------------------------------------------------------------
diff --git a/lib/delphi/test/server.dpr b/lib/delphi/test/server.dpr
index 7cf26a4..6dbc914 100644
--- a/lib/delphi/test/server.dpr
+++ b/lib/delphi/test/server.dpr
@@ -34,6 +34,7 @@ uses
   Thrift.Collections in '..\src\Thrift.Collections.pas',
   Thrift.Server in '..\src\Thrift.Server.pas',
   Thrift.Console in '..\src\Thrift.Console.pas',
+  Thrift.TypeRegistry in '..\src\Thrift.TypeRegistry.pas',
   Thrift.Utils in '..\src\Thrift.Utils.pas',
   Thrift.Stream in '..\src\Thrift.Stream.pas';