Skip to content

Commit 686d519

Browse files
authored
SizeClassOnceObjectSizerJUnitTest (#7906)
* SizeClassOnceObjectSizerJUnitTest
1 parent 49b3434 commit 686d519

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

geode-core/src/test/java/org/apache/geode/internal/size/SizeClassOnceObjectSizerJUnitTest.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.junit.Test;
2323

2424
import org.apache.geode.cache.util.ObjectSizer;
25+
import org.apache.geode.internal.lang.SystemUtils;
2526

2627
public class SizeClassOnceObjectSizerJUnitTest {
2728

@@ -44,15 +45,19 @@ public void test() {
4445
- ObjectSizer.SIZE_CLASS_ONCE.sizeof(new char[0]);
4546

4647
// Make sure that we actually size strings each time
47-
assertEquals(emptySize + roundup(OBJECT_SIZE + 4 + 5 * 2),
48-
ObjectSizer.SIZE_CLASS_ONCE.sizeof(s1));
49-
assertEquals(emptySize + roundup(OBJECT_SIZE + 4 + 10 * 2),
50-
ObjectSizer.SIZE_CLASS_ONCE.sizeof(s2));
48+
if (!SystemUtils.isAzulJVM()) {
49+
assertEquals(emptySize + roundup(OBJECT_SIZE + 4 + 5 * 2),
50+
ObjectSizer.SIZE_CLASS_ONCE.sizeof(s1));
51+
assertEquals(emptySize + roundup(OBJECT_SIZE + 4 + 10 * 2),
52+
ObjectSizer.SIZE_CLASS_ONCE.sizeof(s2));
53+
}
5154

5255
TestObject t1 = new TestObject(5);
5356
TestObject t2 = new TestObject(15);
5457
int t1Size = ObjectSizer.SIZE_CLASS_ONCE.sizeof(t1);
55-
assertEquals(roundup(OBJECT_SIZE + REFERENCE_SIZE) + roundup(OBJECT_SIZE + 4 + 5), t1Size);
58+
if (!SystemUtils.isAzulJVM()) {
59+
assertEquals(roundup(OBJECT_SIZE + REFERENCE_SIZE) + roundup(OBJECT_SIZE + 4 + 5), t1Size);
60+
}
5661
// Since we are using SIZE_CLASS_ONCE t2 should have the same size as t1
5762
assertEquals(t1Size, ObjectSizer.SIZE_CLASS_ONCE.sizeof(t2));
5863
}

0 commit comments

Comments
 (0)