[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/raw ...
Ron Sigal
ron_sigal at yahoo.com
Wed Jan 31 01:14:23 EST 2007
User: rsigal
Date: 07/01/31 01:14:23
Modified: src/tests/org/jboss/test/remoting/transport/socket/raw Tag:
remoting_2_x RawTestClient.java
Log:
JBREM-692: The test mimics the new behavior of ClientSocketWrapper and ServerSocketWrapper, reusing object streams.
Revision Changes Path
No revision
No revision
1.1.2.2 +14 -3 JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/raw/RawTestClient.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RawTestClient.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/raw/RawTestClient.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- RawTestClient.java 2 Nov 2006 18:54:22 -0000 1.1.2.1
+++ RawTestClient.java 31 Jan 2007 06:14:23 -0000 1.1.2.2
@@ -37,21 +37,30 @@
public void makeRawInvocation()
{
+ // In response to JBREM-692 (Let marshallers/unmarshallers construct
+ // their preferred streams.), some changes are necessary to make this
+ // test work. SerializableMarshaller and SerializableUnMarshaller now
+ // implement the method getMarshallingStream(), which allows
+ // ClientSocketWrapper and ServerSocketWrapper to get object streams
+ // when they are created and cache them for future use, instead of
+ // recreating them with each invocation.
+
try
{
getSocket();
// Write version.
- out.write(1);
+// out.write(1);
+ oos.write(1);
out.flush();
// Write invocation.
- oos = new ObjectOutputStream(out);
+// oos = new ObjectOutputStream(out);
oos.writeObject("This is the request");
oos.flush();
// Get response.
- objInputStream = new ObjectInputStream(in);
+// objInputStream = new ObjectInputStream(in);
Object obj = objInputStream.readObject();
System.out.println("response: " + obj);
assertEquals(RawTestServer.RESPONSE, obj);
@@ -81,6 +90,8 @@
out = new BufferedOutputStream(socket.getOutputStream());
in = new BufferedInputStream(socket.getInputStream());
+ oos = new ObjectOutputStream(out);
+ objInputStream = new ObjectInputStream(in);
}
catch(IOException e)
{
More information about the jboss-cvs-commits
mailing list