removed old tests

This commit is contained in:
Shautvast 2024-07-03 14:09:39 +02:00
parent 1dee9a9b05
commit a73acb9ddb
2 changed files with 0 additions and 46 deletions

View file

@ -1,22 +0,0 @@
package com.github.shautvast.exceptional;
import java.lang.foreign.Arena;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
class MPSCBufferWriterTest {
// @Test
void test() throws InterruptedException {
var arena = Arena.ofConfined();
var ringbufferMemory = arena.allocate(4096);
// var buffer = new CircularByteBuffer(ringbufferMemory);
CircularBufferWriter writer = new CircularBufferWriter();
byte[] bytes = "cow".getBytes(UTF_8);
writer.put(bytes);
writer.put(bytes);
Thread.sleep(10000);
writer.close();
}
}

View file

@ -1,24 +0,0 @@
package com.github.shautvast.exceptional;
import org.junit.jupiter.api.Test;
import java.nio.charset.StandardCharsets;
// TODO scheduled for demolition
class RingBufferTest {
@Test
void testWriteAndRead() {
// var ringBuffer = new CircularByteBuffer(MemorySegment.ofArray(new byte[16]));
var writer = new CircularBufferWriter();
// writer.startReader(x -> System.out.println("read " + new String(x, StandardCharsets.UTF_8)));
for (int i = 0; i < 10; i++) {
System.out.println("put " + i + " in ring buffer");
byte[] testdata = ("test" + i).getBytes(StandardCharsets.UTF_8);
writer.put(testdata);
}
}
}