[TEST] Fix issue with HttpInfo passed invalid parameter

HttpInfo is passed the maxContentLength as a parameter, but this value should
never be negative. This fixes the test to only pass a positive random value.
This commit is contained in:
Lee Hinman 2018-03-27 14:20:06 -06:00
parent b4c78019b0
commit 7df66abaf5
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ public class NodeInfoStreamingTests extends ESTestCase {
new TransportAddress[]{buildNewFakeTransportAddress()}, buildNewFakeTransportAddress()); new TransportAddress[]{buildNewFakeTransportAddress()}, buildNewFakeTransportAddress());
profileAddresses.put("test_address", dummyBoundTransportAddress); profileAddresses.put("test_address", dummyBoundTransportAddress);
TransportInfo transport = randomBoolean() ? null : new TransportInfo(dummyBoundTransportAddress, profileAddresses); TransportInfo transport = randomBoolean() ? null : new TransportInfo(dummyBoundTransportAddress, profileAddresses);
HttpInfo httpInfo = randomBoolean() ? null : new HttpInfo(dummyBoundTransportAddress, randomLong()); HttpInfo httpInfo = randomBoolean() ? null : new HttpInfo(dummyBoundTransportAddress, randomNonNegativeLong());
PluginsAndModules pluginsAndModules = null; PluginsAndModules pluginsAndModules = null;
if (randomBoolean()) { if (randomBoolean()) {