2222import org .junit .Test ;
2323
2424import org .apache .geode .cache .util .ObjectSizer ;
25+ import org .apache .geode .internal .lang .SystemUtils ;
2526
2627public 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