Making message size statistic tests more reliable
This commit is contained in:
Christopher L. Shannon (cshannon) 2015-09-10 16:22:44 +00:00
parent f4a2543def
commit 3ec560f2a8
1 changed files with 1 additions and 2 deletions

View File

@ -253,8 +253,7 @@ public abstract class AbstractStoreStatTestSupport {
*/
protected BytesMessage createMessage(Session session, int messageSize, AtomicLong publishedMessageSize) throws JMSException {
final BytesMessage message = session.createBytesMessage();
final Random rn = new Random();
int size = rn.nextInt(messageSize - 100);
int size = messageSize;
if (publishedMessageSize != null) {
publishedMessageSize.addAndGet(size);
}