Skip to content

Commit 8530671

Browse files
committed
Fix tests
1 parent 501f0e8 commit 8530671

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/java/io/fusionauth/http/CoreTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,11 @@ public void large_body(String scheme) throws Exception {
443443
// for the HTTP preamble, and for HTTPs additional overhead is incurred due to encryption. But if we are counting incorrectly
444444
// due to bytes being pushed back and counted again, the numbers would be almost double.
445445
// - So we should expect the bytes read to be within the ball bark of the payload length.
446-
assertEquals(instrumenter.getBytesRead(), scheme.equals("http") ? 17_032: 16_933);
446+
// - Note, this number will vary by HTTP and HTTPS due to the overhead of encryption, and can also vary by system.
447+
// The lower boundary is the actual payload size, and the upper boundary is something reasonable that encompasses some of the sizes
448+
// I've seen.
449+
long bytesRead = instrumenter.getBytesRead();
450+
assertTrue(bytesRead >= 16_804 && bytesRead <= 17_100);
447451
}
448452
}
449453

0 commit comments

Comments
 (0)