Skip to content

Commit

Permalink
[Java] Fixed outdated java-clean-build script and MqttPahoClientTest
Browse files Browse the repository at this point in the history
Change-Id: Id83cbc4a338fee15be62202c129f445be22dca97
  • Loading branch information
Florian Albrecht authored and Florian Albrecht committed Sep 26, 2018
1 parent c250cf4 commit b934709
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
43 changes: 41 additions & 2 deletions docker/joynr-java/scripts/build/java-clean-build
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,48 @@ while [ "$1" != "" ]; do
shift
done

echo '####################################################'
echo '# start tests'
echo '####################################################'

cd /data/src

# 1st run; just build without tests to provide WAR files for payara
mvn clean $GOAL -P no-license-and-notice,no-java-formatter,no-checkstyle \
-DskipTests=true \
-Dmaven.test.failure.ignore=true \
-Denforcer.skip=true -Dmaven.compile.fork=true \
-Dmaven.junit.fork=true

echo '####################################################'
echo '# start services'
echo '####################################################'
mosquitto -c /etc/mosquitto/mosquitto.conf -v &
MOSQUITTO_PID=$!

DISCOVERY_DIRECTORY_WAR_FILE=$(find /data/src/java/backend-services/discovery-directory-jee/target -iregex ".*discovery-directory-jee-.*war")
DOMAIN_ACCESS_CONTROLLER_WAR_FILE=$(find /data/src/java/backend-services/domain-access-controller-jee/target -iregex ".*domain-access-controller-jee-.*war")

/data/src/docker/joynr-base/scripts/start-payara.sh -w $DISCOVERY_DIRECTORY_WAR_FILE,$DOMAIN_ACCESS_CONTROLLER_WAR_FILE

# Assume that mosquitto and payara have sufficient time to startup before reaching
# any test code that requires it;
# also assume that it is safe to remove and recreate WAR files once payara got
# started and WAR files have been deployed

# 2nd run; now including test execution which requires mosquitto / payara
mvn clean $GOAL -P no-license-and-notice,no-java-formatter,no-checkstyle \
-DskipTests=$SKIPTESTS \
-Denforcer.skip=true \
-Dmaven.compile.fork=true \
-Dmaven.test.failure.ignore=true \
-Denforcer.skip=true -Dmaven.compile.fork=true \
-Dmaven.junit.fork=true

echo '####################################################'
echo '# stop services'
echo '####################################################'

/data/src/docker/joynr-base/scripts/stop-payara.sh

kill -TERM $MOSQUITTO_PID
wait $MOSQUITTO_PID
exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ public void setUp() {
properties.put(LimitAndBackpressureSettings.PROPERTY_BACKPRESSURE_INCOMING_MQTT_REQUESTS_LOWER_THRESHOLD, "20");
properties.put(MqttModule.PROPERTY_MQTT_CLEAN_SESSION, "false");
properties.put(MqttModule.PROPERTY_KEY_MQTT_MAX_MESSAGE_SIZE_BYTES, "0");
properties.put(MqttModule.PROPERTY_KEY_MQTT_BROKER_URI, "tcp://localhost:" + mqttBrokerPort);
serializedMessage = new byte[10];
}

Expand Down

0 comments on commit b934709

Please sign in to comment.