Author: ron.sigal(a)jboss.com
Date: 2009-08-27 10:36:59 -0400 (Thu, 27 Aug 2009)
New Revision: 5398
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/marshal/HttpContentTypeTestCase.java
Log:
JBREM-1145: Changed test for InvocationResponse returned as String.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/marshal/HttpContentTypeTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/marshal/HttpContentTypeTestCase.java 2009-08-27
14:36:30 UTC (rev 5397)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/marshal/HttpContentTypeTestCase.java 2009-08-27
14:36:59 UTC (rev 5398)
@@ -120,21 +120,12 @@
// Do invocation.
Object o = client.invoke("abc");
+
+ // Show that an InvocationResponse was incorrectly returned as a Strin..
assertTrue(o instanceof String);
String result = (String) o;
+ assertTrue(result.indexOf("org.jboss.remoting.InvocationResponse") >=
0);
- // Show that an InvocationResponse was incorrectly returned as a String, starting
with
- // the ObjectInputStream header bytes.
- byte[] bytes = result.getBytes();
- System.out.print("bytes: ");
- for (int i = 0; i < bytes.length; i++)
- System.out.print(bytes[i] + " ");
- System.out.println("");
- assertEquals(-84, bytes[0]);
- assertEquals(-19, bytes[1]);
- assertEquals(0, bytes[2]);
- assertEquals(5, bytes[3]);
-
// Check remoting content type handling.
validateOrdinaryInvocation(client);
@@ -161,21 +152,12 @@
// Do invocation.
Object o = client.invoke("abc");
+
+ // Show that an InvocationResponse was incorrectly returned as a String.
assertTrue(o instanceof String);
String result = (String) o;
+ assertTrue(result.indexOf("org.jboss.remoting.InvocationResponse") >=
0);
- // Show that an InvocationResponse was incorrectly returned as a String, starting
with
- // the ObjectInputStream header bytes.
- byte[] bytes = result.getBytes();
- System.out.print("bytes: ");
- for (int i = 0; i < bytes.length; i++)
- System.out.print(bytes[i] + " ");
- System.out.println("");
- assertEquals(-84, bytes[0]);
- assertEquals(-19, bytes[1]);
- assertEquals(0, bytes[2]);
- assertEquals(5, bytes[3]);
-
// Check remoting content type handling.
validateOrdinaryInvocation(client);