Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Tweak C++ and Java interop tests
  • Loading branch information
rogersimmons committed Feb 15, 2023
commit 7f4759949489ae0be9c24d3640e98d3ece5cbb4b
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<argLine>-Dchronicle.test.env=from-cpp</argLine>
<forkCount>1</forkCount>
<!-- <reuseForks>false</reuseForks>-->
<runOrder>hourly</runOrder>
Expand Down
17 changes: 9 additions & 8 deletions src/test/java/net/openhft/chronicle/queue/RawAccessJavaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class RawAccessJavaTest extends QueueTestCommon {

boolean assert_from_cpp() {
String env = System.getProperty("chronicle.test.env");
return env != null && env.equals("from-cpp");
return (env != null && env.equals("from-cpp"));
}

@Test
Expand All @@ -62,8 +62,8 @@ public void Tailer() {
// document length, inc 4-byte length
int length = Wires.lengthOf(header);

// actual length of data
int data_length = bytes.readInt();
// // actual length of data
// int data_length = bytes.readInt();

assertEquals(bytes.readByte(), (byte) 0xab);
assertEquals(bytes.readShort(), (short) 12);
Expand Down Expand Up @@ -98,9 +98,9 @@ public void Appender() {

Bytes<?> bytes = dc.wire().bytes();

// will contain the size of the blob
long start = bytes.writePosition();
bytes.writeSkip(RAW_SIZE_PREFIX);
// // will contain the size of the blob
// long start = bytes.writePosition();
// bytes.writeSkip(RAW_SIZE_PREFIX);

{
bytes.writeByte((byte) 0xab);
Expand All @@ -113,8 +113,9 @@ public void Appender() {
bytes.write8bit("Hello World");
}

long end = bytes.writePosition();
bytes.writeInt(start, (int) (end - start - RAW_SIZE_PREFIX));
//
// long end = bytes.writePosition();
// bytes.writeInt(start, (int) (end - start - RAW_SIZE_PREFIX));
}
}
}
Expand Down