Skip to content

Commit

Permalink
fix tests to use centralized malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
bluestreak01 committed Apr 29, 2024
1 parent 7a88fc7 commit 004171b
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 165 deletions.
8 changes: 4 additions & 4 deletions core/src/test/java/io/questdb/test/cairo/TableUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ public void testIsValidTableName() {

@Test
public void testNullValue() {
long mem1 = Unsafe.getUnsafe().allocateMemory(32);
long mem2 = Unsafe.getUnsafe().allocateMemory(32);
long mem1 = Unsafe.malloc(32, MemoryTag.NATIVE_DEFAULT);
long mem2 = Unsafe.malloc(32, MemoryTag.NATIVE_DEFAULT);
try {
for (int columnType = 0; columnType < ColumnType.NULL; columnType++) {

Expand All @@ -244,8 +244,8 @@ public void testNullValue() {
}
}
} finally {
Unsafe.getUnsafe().freeMemory(mem1);
Unsafe.getUnsafe().freeMemory(mem2);
Unsafe.free(mem1, 32, MemoryTag.NATIVE_DEFAULT);
Unsafe.free(mem2, 32, MemoryTag.NATIVE_DEFAULT);
}
}

Expand Down

0 comments on commit 004171b

Please sign in to comment.