Skip to content

Commit

Permalink
Merge pull request #12 in LIBS/ihmc-java-ros2-communication from rele…
Browse files Browse the repository at this point in the history
…ase/0.13.1 to master

* commit '8f6dbe56ac538a20f2446ae796c2e7fac311f5eb': (23 commits)
  🔖 0.13.1
  ⬆️ ihmc-pub-sub 0.10.1.
  ⬆️ euclid 0.11.0.
  Get better info about what's hanging. This upgrade adds better test logging.
  ⬆️ ihmc-build 0.15.5, woops regex missed the plugins block
  ⬆️ ihmc-build 0.15.5
  Push Assert to fix Gradle compile.
  Convert to JUnit 5.
  Add JUnit 4 to 5 Assert translator.
  Upgrade ihmc-ci plugin.
  ⬆️ ihmc-build 0.15.4
  ⬆️ ihmc-ci 1.1.6
  ⬆️ ihmc-ci 1.1.5
  Fix starting path.
  Fix LogTools path
  ⬆️ ihmc-commons 0.24.0
  ⬆️ ihmc-ci 1.1.3
  Add working dir message.
  Fix test path.
  ⬆️ ihmc-ci 1.1.3
  ...
  • Loading branch information
Sylvain Bertrand committed Dec 12, 2018
2 parents 6d52905 + 8f6dbe5 commit 559a33f
Show file tree
Hide file tree
Showing 18 changed files with 572 additions and 77 deletions.
12 changes: 2 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
mavenLocal()
jcenter()
}
dependencies {
classpath "us.ihmc:ihmc-build:0.15.1"
}
plugins {
id("us.ihmc.ihmc-build") version "0.15.5"
}
apply plugin: "us.ihmc.ihmc-build"
2 changes: 1 addition & 1 deletion group.gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = us.ihmc
version = 0.13.0
version = 0.13.1
vcsUrl = https://github.com/ihmcrobotics/ihmc-java-ros2-communication
openSource = true
maintainer = "Duncan Calvert (dcalvert@ihmc.us)"
19 changes: 5 additions & 14 deletions ihmc-ros2-library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
buildscript {
repositories {
mavenCentral()
maven { url "http://dl.bintray.com/ihmcrobotics/maven-release" }
maven { url "https://plugins.gradle.org/m2/" }
mavenLocal()
}
dependencies {
classpath "us.ihmc:ihmc-build:0.15.1"
}
plugins {
id("us.ihmc.ihmc-build") version "0.15.5"
id("us.ihmc.ihmc-ci") version "3.4"
}

apply plugin: "us.ihmc.ihmc-build"

ihmc {
loadProductProperties("../group.gradle.properties")

Expand All @@ -20,9 +11,9 @@ ihmc {
}

mainDependencies {
compile group: "us.ihmc", name: "ihmc-pub-sub", version: "0.10.0"
compile group: "us.ihmc", name: "ihmc-pub-sub", version: "0.10.1"
compile group: "us.ihmc", name: "IHMCRealtime", version: "1.1.8"
compile group: "us.ihmc", name: "ihmc-commons", version: "0.24.0"
compile group: "us.ihmc", name: "ihmc-commons", version: "0.25.0"
}

testDependencies {
Expand Down
2 changes: 1 addition & 1 deletion ihmc-ros2-library/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenLocal()
}
dependencies {
classpath "us.ihmc:ihmc-build:0.15.1"
classpath "us.ihmc:ihmc-build:0.15.5"
}
}

Expand Down
175 changes: 175 additions & 0 deletions ihmc-ros2-library/src/test/java/us/ihmc/robotics/Assert.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
package us.ihmc.robotics;

public class Assert
{
static public void assertTrue(String message, boolean condition)
{
org.junit.jupiter.api.Assertions.assertTrue(condition, message);
}

static public void assertTrue(boolean condition)
{
org.junit.jupiter.api.Assertions.assertTrue(condition);
}

static public void assertFalse(String message, boolean condition)
{
org.junit.jupiter.api.Assertions.assertFalse(condition, message);
}

static public void assertFalse(boolean condition)
{
org.junit.jupiter.api.Assertions.assertFalse(condition);
}

static public void fail(String message)
{
org.junit.jupiter.api.Assertions.fail(message);
}

static public void fail()
{
org.junit.jupiter.api.Assertions.fail();
}

static public void assertEquals(String message, Object expected, Object actual)
{
org.junit.jupiter.api.Assertions.assertEquals(expected, actual, message);
}

static public void assertEquals(Object expected, Object actual)
{
org.junit.jupiter.api.Assertions.assertEquals(expected, actual);
}

static public void assertNotEquals(Object expected, Object actual)
{
org.junit.jupiter.api.Assertions.assertNotEquals(expected, actual);
}

static public void assertNotEquals(long first, long second)
{
org.junit.jupiter.api.Assertions.assertNotEquals(first, second);
}

static public void assertNotEquals(String message, double first, double second, double delta)
{
org.junit.jupiter.api.Assertions.assertNotEquals(first, second, message);
}

static public void assertNotEquals(double first, double second, double delta)
{
org.junit.jupiter.api.Assertions.assertNotEquals(first, second);
}

public static void assertArrayEquals(Object[] expecteds, Object[] actuals)
{
org.junit.jupiter.api.Assertions.assertArrayEquals(expecteds, actuals);
}

public static void assertArrayEquals(int[] expecteds, int[] actuals)
{
org.junit.jupiter.api.Assertions.assertArrayEquals(expecteds, actuals);
}

public static void assertArrayEquals(byte[] expecteds, byte[] actuals)
{
org.junit.jupiter.api.Assertions.assertArrayEquals(expecteds, actuals);
}

public static void assertArrayEquals(double[] expecteds, double[] actuals, double delta)
{
if (delta == 0.0)
org.junit.jupiter.api.Assertions.assertArrayEquals(expecteds, actuals);
else
org.junit.jupiter.api.Assertions.assertArrayEquals(expecteds, actuals, delta);
}

public static void assertArrayEquals(float[] expecteds, float[] actuals, float delta)
{
if (delta == 0.0)
org.junit.jupiter.api.Assertions.assertArrayEquals(expecteds, actuals);
else
org.junit.jupiter.api.Assertions.assertArrayEquals(expecteds, actuals, delta);
}

public static void assertArrayEquals(String string, double[] data, double[] ds, double delta)
{
if (delta == 0.0)
org.junit.jupiter.api.Assertions.assertArrayEquals(data, ds, string);
else
org.junit.jupiter.api.Assertions.assertArrayEquals(data, ds, delta, string);
}

static public void assertEquals(String message, double expected, double actual, double delta)
{
if (delta == 0.0)
org.junit.jupiter.api.Assertions.assertEquals(expected, actual, message);
else
org.junit.jupiter.api.Assertions.assertEquals(expected, actual, delta, message);
}

static public void assertEquals(String message, float expected, float actual, float delta)
{
if (delta == 0.0)
org.junit.jupiter.api.Assertions.assertEquals(expected, actual, message);
else
org.junit.jupiter.api.Assertions.assertEquals(expected, actual, delta, message);
}

static public void assertEquals(long expected, long actual)
{
org.junit.jupiter.api.Assertions.assertEquals(expected, actual);
}

static public void assertEquals(String message, long expected, long actual)
{
org.junit.jupiter.api.Assertions.assertEquals(expected, actual, message);
}

static public void assertEquals(double expected, double actual, double delta)
{
if (delta == 0.0)
org.junit.jupiter.api.Assertions.assertEquals(expected, actual);
else
org.junit.jupiter.api.Assertions.assertEquals(expected, actual, delta);
}

static public void assertEquals(float expected, float actual, float delta)
{
if (delta == 0.0)
org.junit.jupiter.api.Assertions.assertEquals(expected, actual);
else
org.junit.jupiter.api.Assertions.assertEquals(expected, actual, delta);
}

static public void assertNotNull(String message, Object object)
{
org.junit.jupiter.api.Assertions.assertNotNull(object, message);
}

static public void assertNotNull(Object object)
{
org.junit.jupiter.api.Assertions.assertNotNull(object);
}

static public void assertNull(String message, Object object)
{
org.junit.jupiter.api.Assertions.assertNull(object, message);
}

static public void assertNull(Object object)
{
org.junit.jupiter.api.Assertions.assertNull(object);
}

static public void assertSame(Object expected, Object actual)
{
org.junit.jupiter.api.Assertions.assertSame(expected, actual);
}

static public void assertNotSame(Object unexpected, Object actual)
{
org.junit.jupiter.api.Assertions.assertNotSame(unexpected, actual);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.apache.commons.lang3.tuple.MutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import ros_msgs.msg.dds.TwoNum;
import ros_msgs.msg.dds.TwoNumPubSubType;
import us.ihmc.pubsub.DomainFactory.PubSubImplementation;
Expand All @@ -11,25 +11,25 @@

public class CommunicationTest
{
@Test(timeout = 5000)
@Test// timeout = 5000
public void testSimpleIntraProcessCommunication()
{
testSimpleCommunication(PubSubImplementation.INTRAPROCESS, null);
}

@Test(timeout = 5000)
@Test// timeout = 5000
public void testSimpleRealRTPSCommunicationDefaultRosVersion()
{
testSimpleCommunication(PubSubImplementation.FAST_RTPS, null);
}

@Test(timeout = 5000)
@Test// timeout = 5000
public void testSimpleRealRTPSCommunicationArdent()
{
testSimpleCommunication(PubSubImplementation.FAST_RTPS, Ros2Distro.ARDENT);
}

@Test(timeout = 5000)
@Test// timeout = 5000
public void testSimpleRealRTPSCommunicationBouncy()
{
testSimpleCommunication(PubSubImplementation.FAST_RTPS, Ros2Distro.BOUNCY);
Expand Down Expand Up @@ -75,7 +75,7 @@ private void testSimpleCommunication(PubSubImplementation pubSubImplementation,
Thread.yield();
}

@Test(timeout = 5000)
@Test// timeout = 5000
public void testSimpleRealRTPSCommunicationAndDestroy()
{
Pair<Integer, Integer> messagesReceived = new MutablePair<>();
Expand Down Expand Up @@ -117,7 +117,7 @@ public void testSimpleRealRTPSCommunicationAndDestroy()
Thread.yield();
}

@Test(timeout = 5000)
@Test// timeout = 5000
public void testSimpleIntraProcessCommunicationRealtime()
{
Pair<Integer, Integer> messagesReceived = new MutablePair<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

import org.apache.commons.lang3.tuple.MutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import ros_msgs.msg.dds.Num;
import ros_msgs.msg.dds.NumPubSubType;
import us.ihmc.pubsub.DomainFactory.PubSubImplementation;
import us.ihmc.pubsub.common.SampleInfo;
import us.ihmc.ros2.Ros2Node;
import us.ihmc.ros2.Ros2Publisher;

import static org.junit.Assert.*;
import static us.ihmc.robotics.Assert.*;

public class DataTypesTest
{
@Test(timeout = 30000)
@Test// timeout = 30000
public void testAllDoubleValuesGetAcross()
{
Pair<Integer, Integer> messagesReceived = new MutablePair<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package us.ihmc.ros2.example;

import org.apache.commons.lang3.SystemUtils;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import ros_msgs.msg.dds.BigNumSequence;
import ros_msgs.msg.dds.BigNumSequencePubSubType;
import ros_msgs.msg.dds.Num;
Expand Down Expand Up @@ -44,7 +44,7 @@ public class RealtimeRos2IntraprocessCopyTest
{
public static final int NUMBER_OF_MESSAGES_TO_SEND = 20;

@Test(timeout = 300000)
@Test// timeout = 300000
public void testIntraprocessCopy() throws IOException, InterruptedException
{
Random random = new Random(892141240123L);
Expand Down
12 changes: 8 additions & 4 deletions ros2-common-interfaces/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ buildscript {
jcenter()
}
dependencies {
classpath "us.ihmc:ihmc-build:0.15.1"
classpath "us.ihmc:ros2-msg-to-pubsub-generator:0.13.0"
classpath "org.ajoberstar:grgit:2.1.0"
}
}
apply plugin: "us.ihmc.ihmc-build"

plugins {
id("us.ihmc.ihmc-build") version "0.15.5"
id("us.ihmc.ihmc-ci") version "3.4"
}

apply plugin: "org.ajoberstar.grgit"

def rclInterfacesPath = "src/main/vendor/rcl_interfaces"
Expand All @@ -38,8 +42,8 @@ ihmc {
}

mainDependencies {
compile group: "us.ihmc", name: "euclid", version: "0.9.3"
compile group: "us.ihmc", name: "ihmc-pub-sub", version: "0.10.0"
compile group: "us.ihmc", name: "euclid-geometry", version: "0.11.0"
compile group: "us.ihmc", name: "ihmc-pub-sub", version: "0.10.1"
}

generatorDependencies {
Expand Down
2 changes: 1 addition & 1 deletion ros2-common-interfaces/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenLocal()
}
dependencies {
classpath "us.ihmc:ihmc-build:0.15.1"
classpath "us.ihmc:ihmc-build:0.15.5"
}
}

Expand Down
13 changes: 4 additions & 9 deletions ros2-msg-to-idl-generator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
mavenLocal()
}
dependencies {
classpath "us.ihmc:ihmc-build:0.15.1"
}
plugins {
id("us.ihmc.ihmc-build") version "0.15.5"
id("us.ihmc.ihmc-ci") version "3.4"
}
apply plugin: "us.ihmc.ihmc-build"

apply plugin: "application"

ihmc {
Expand Down
Loading

0 comments on commit 559a33f

Please sign in to comment.