|
29 | 29 | import io.questdb.client.cutlass.qwp.client.QwpWebSocketEncoder; |
30 | 30 | import io.questdb.client.cutlass.qwp.protocol.QwpTableBuffer; |
31 | 31 | import io.questdb.client.std.Unsafe; |
32 | | -import static io.questdb.client.test.tools.TestUtils.assertMemoryLeak; |
33 | 32 | import org.junit.Assert; |
34 | 33 | import org.junit.Test; |
35 | 34 |
|
36 | 35 | import static io.questdb.client.cutlass.qwp.protocol.QwpConstants.*; |
| 36 | +import static io.questdb.client.test.tools.TestUtils.assertMemoryLeak; |
37 | 37 |
|
38 | 38 | /** |
39 | 39 | * Unit tests for QwpWebSocketEncoder. |
@@ -446,10 +446,10 @@ public void testEncodeMultipleColumns() throws Exception { |
446 | 446 | // Verify header |
447 | 447 | QwpBufferWriter buf = encoder.getBuffer(); |
448 | 448 | long ptr = buf.getBufferPtr(); |
449 | | - Assert.assertEquals((byte) 'I', Unsafe.getUnsafe().getByte(ptr)); |
450 | | - Assert.assertEquals((byte) 'L', Unsafe.getUnsafe().getByte(ptr + 1)); |
| 449 | + Assert.assertEquals((byte) 'Q', Unsafe.getUnsafe().getByte(ptr)); |
| 450 | + Assert.assertEquals((byte) 'W', Unsafe.getUnsafe().getByte(ptr + 1)); |
451 | 451 | Assert.assertEquals((byte) 'P', Unsafe.getUnsafe().getByte(ptr + 2)); |
452 | | - Assert.assertEquals((byte) '4', Unsafe.getUnsafe().getByte(ptr + 3)); |
| 452 | + Assert.assertEquals((byte) '1', Unsafe.getUnsafe().getByte(ptr + 3)); |
453 | 453 | } |
454 | 454 | }); |
455 | 455 | } |
@@ -692,10 +692,10 @@ public void testEncodeSingleRowWithLong() throws Exception { |
692 | 692 | long ptr = buf.getBufferPtr(); |
693 | 693 |
|
694 | 694 | // Verify header magic |
695 | | - Assert.assertEquals((byte) 'I', Unsafe.getUnsafe().getByte(ptr)); |
696 | | - Assert.assertEquals((byte) 'L', Unsafe.getUnsafe().getByte(ptr + 1)); |
| 695 | + Assert.assertEquals((byte) 'Q', Unsafe.getUnsafe().getByte(ptr)); |
| 696 | + Assert.assertEquals((byte) 'W', Unsafe.getUnsafe().getByte(ptr + 1)); |
697 | 697 | Assert.assertEquals((byte) 'P', Unsafe.getUnsafe().getByte(ptr + 2)); |
698 | | - Assert.assertEquals((byte) '4', Unsafe.getUnsafe().getByte(ptr + 3)); |
| 698 | + Assert.assertEquals((byte) '1', Unsafe.getUnsafe().getByte(ptr + 3)); |
699 | 699 |
|
700 | 700 | // Version |
701 | 701 | Assert.assertEquals(VERSION_1, Unsafe.getUnsafe().getByte(ptr + 4)); |
|
0 commit comments