mirror of https://github.com/apache/activemq.git
Making message size statistic tests more reliable
This commit is contained in:
parent
f4a2543def
commit
3ec560f2a8
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue