CVS update: JGroups/tests/junit-functional/org/jgroups/tests SizeTest.java
"Bela Ban" <[email protected]> Mon, 25 Oct 2010 11:53:12 +0000
| Newsgroups | gmane.comp.java.javagroups.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: belaban
Date: 10/10/25 11:53:12
Modified: tests/junit-functional/org/jgroups/tests SizeTest.java
Log:
ns
Revision Changes Path
1.34 +9 -2 JGroups/tests/junit-functional/org/jgroups/tests/SizeTest.java
Index: SizeTest.java
===================================================================
RCS file: /cvsroot/javagroups/JGroups/tests/junit-functional/org/jgroups/tests/SizeTest.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- SizeTest.java 30 Aug 2010 14:12:52 -0000 1.33
+++ SizeTest.java 25 Oct 2010 11:53:12 -0000 1.34
@@ -22,7 +22,7 @@
/**
* Tests whether method size() of a header and its serialized size correspond
* @author Bela Ban
- * @version $Id: SizeTest.java,v 1.33 2010/08/30 14:12:52 belaban Exp $
+ * @version $Id: SizeTest.java,v 1.34 2010/10/25 11:53:12 belaban Exp $
*/
@Test(groups=Global.FUNCTIONAL)
public class SizeTest {
@@ -507,6 +507,13 @@
}
+ public static void testStompHeader() throws Exception {
+ STOMP.StompHeader hdr=STOMP.StompHeader.createMessageHeader("/topics/chat", UUID.randomUUID().toString());
+ _testSize(hdr);
+
+ hdr=STOMP.StompHeader.createEndpointHeader("192.168.1.5:8787");
+ _testSize(hdr);
+ }
public static void testStateHeader() throws Exception {
IpAddress addr=new IpAddress("127.0.0.1", 5555);
@@ -749,7 +756,7 @@
private static void _testSize(Header hdr) throws Exception {
long size=hdr.size();
- byte[] serialized_form=Util.streamableToByteBuffer((Streamable)hdr);
+ byte[] serialized_form=Util.streamableToByteBuffer(hdr);
System.out.println("size=" + size + ", serialized size=" + serialized_form.length);
Assert.assertEquals(serialized_form.length, size);
}
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev