mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 12:37:58 +01:00
[sinttest] Allow maxPayloadChunks == 0
This commit is contained in:
parent
d75cd2acb8
commit
ad8eeebc0d
1 changed files with 7 additions and 1 deletions
|
@ -90,7 +90,13 @@ public class XmppConnectionStressTest {
|
|||
MessageBuilder messageBuilder = fromConnection.getStanzaFactory().buildMessageStanza();
|
||||
messageBuilder.to(toConnection.getUser());
|
||||
|
||||
int payloadChunkCount = random.nextInt(configuration.maxPayloadChunks) + 1;
|
||||
final int payloadChunkCount;
|
||||
if (configuration.maxPayloadChunks == 0) {
|
||||
payloadChunkCount = 0;
|
||||
} else {
|
||||
payloadChunkCount = random.nextInt(configuration.maxPayloadChunks) + 1;
|
||||
}
|
||||
|
||||
for (int c = 0; c < payloadChunkCount; c++) {
|
||||
int payloadChunkSize = random.nextInt(configuration.maxPayloadChunkSize) + 1;
|
||||
String payloadCunk = StringUtils.randomString(payloadChunkSize, random);
|
||||
|
|
Loading…
Reference in a new issue