Author: manik.surtani(a)jboss.com
Date: 2008-02-06 08:14:45 -0500 (Wed, 06 Feb 2008)
New Revision: 5315
Modified:
core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java
Log:
Fixed broken tests
Modified:
core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java 2008-02-06
13:12:44 UTC (rev 5314)
+++
core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java 2008-02-06
13:14:45 UTC (rev 5315)
@@ -7,6 +7,7 @@
package org.jboss.cache.marshall;
import org.jboss.cache.Version;
+import org.jboss.cache.marshall.io.ObjectStreamPool;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.Test;
@@ -55,8 +56,9 @@
VersionAwareMarshaller marshaller =
createVAM(Version.getVersionString(Version.getVersionShort()));
byte[] bytes = marshaller.objectToByteBuffer("Hello");
- // expect that this has been serialized using JBoss Serialization so use this to
get an OIS.
- ObjectInputStream in = ObjectSerializationFactory.createObjectInputStream(bytes);
+ ObjectStreamPool pool = new ObjectStreamPool(1, 1);
+
+ ObjectInputStream in = pool.getInputStream(bytes);
assertEquals("Version header short should be '21'", 21,
in.readShort());
}
@@ -65,8 +67,9 @@
VersionAwareMarshaller marshaller = createVAM("2.0.0.GA");
byte[] bytes = marshaller.objectToByteBuffer("Hello");
- // expect that this has been serialized using JBoss Serialization so use this to
get an OIS.
- ObjectInputStream in = ObjectSerializationFactory.createObjectInputStream(bytes);
+ ObjectStreamPool pool = new ObjectStreamPool(1, 1);
+
+ ObjectInputStream in = pool.getInputStream(bytes);
assertEquals("Version header short should be '20'", 20,
in.readShort());
}
Show replies by date