Author: ron.sigal(a)jboss.com
Date: 2009-09-10 12:05:36 -0400 (Thu, 10 Sep 2009)
New Revision: 5453
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestMarshaller.java
Log:
JBREM-1102: Turned wrote from a boolean to an int.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestMarshaller.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestMarshaller.java 2009-09-10
16:01:03 UTC (rev 5452)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestMarshaller.java 2009-09-10
16:05:36 UTC (rev 5453)
@@ -40,13 +40,13 @@
protected static Logger log = Logger.getLogger(ConfigTestMarshaller.class);
private static final long serialVersionUID = 1L;
private static volatile int cloned;
- private static volatile boolean wrote;
+ private static volatile int wrote;
public void write(Object dataObject, OutputStream output, int version) throws
IOException
{
log.info(this + "writing Wrapper");
super.write(new Wrapper(dataObject), output, version);
- wrote = true;
+ wrote++;
}
public Marshaller cloneMarshaller() throws CloneNotSupportedException
@@ -60,13 +60,13 @@
public static boolean ok(boolean b, int count)
{
log.info("wrote: " + wrote + ", cloned: " + cloned);
- return wrote == b && cloned == count;
+ return (b ? wrote > 0 : wrote == 0) && cloned == count;
}
public static void reset()
{
cloned = 0;
- wrote = false;
+ wrote = 0;
log.info("reset(): wrote: " + wrote + ", cloned: " + cloned);
}
}
Show replies by date