Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak C++ and Java interop tests #1301

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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
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