Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHegarty committed Oct 9, 2023
1 parent c7b8575 commit f494cb7
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public void applyToOracle(BytesRefBuilder oracle) {
});
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/99649")
public void testAddBytesRef() {
testAgainstOracle(() -> new TestIteration() {
BytesRef ref = new BytesRef(randomAlphaOfLengthBetween(1, 100));
Expand All @@ -73,7 +72,6 @@ public void applyToOracle(BytesRefBuilder oracle) {
});
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/99649")
public void testGrow() {
testAgainstOracle(() -> new TestIteration() {
int length = between(1, 100);
Expand Down Expand Up @@ -123,7 +121,7 @@ private void testAgainstOracle(Supplier<TestIteration> iterations) {
boolean willResize = builder.length() + iteration.size() >= builder.bytes().length;
if (willResize) {
long resizeMemoryUsage = BreakingBytesRefBuilder.SHALLOW_SIZE + ramForArray(builder.bytes().length);
resizeMemoryUsage += ramForArray(ArrayUtil.oversize(builder.bytes().length + iteration.size(), Byte.BYTES));
resizeMemoryUsage += ramForArray(ArrayUtil.oversize(builder.length() + iteration.size(), Byte.BYTES));
if (resizeMemoryUsage > limit) {
Exception e = expectThrows(CircuitBreakingException.class, () -> iteration.applyToBuilder(builder));
assertThat(e.getMessage(), equalTo("over test limit"));
Expand Down

0 comments on commit f494cb7

Please sign in to comment.