Fix the integration test

This commit is contained in:
Guillaume Nodet
2021-01-14 14:08:16 +01:00
parent 3b2efbfead
commit a846ccb96d
3 changed files with 17 additions and 11 deletions

View File

@@ -48,14 +48,16 @@ public class ConcurrentDownloadsTest {
int maxCur = 0;
int cur = 0;
for (Message m : o.getMessages()) {
if (m.getType() == Message.TRANSFER_STARTED) {
if (((Message.TransferEvent) m).getResourceName().contains("apache-camel")) {
cur++;
maxCur = Math.max(cur, maxCur);
}
} else if (m.getType() == Message.TRANSFER_SUCCEEDED) {
if (((Message.TransferEvent) m).getResourceName().contains("apache-camel")) {
cur--;
if (m instanceof Message.TransferEvent) {
Message.TransferEvent event = (Message.TransferEvent) m;
String resource = event.getResourceName();
if (resource.contains("apache-camel") || resource.contains("apache-activemq")) {
if (m.getType() == Message.TRANSFER_STARTED) {
cur++;
maxCur = Math.max(cur, maxCur);
} else if (m.getType() == Message.TRANSFER_SUCCEEDED) {
cur--;
}
}
}
}

View File

@@ -34,9 +34,10 @@
<artifactId>maven-compiler-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>apache-camel</artifactId>
<version>3.7.0</version>
<groupId>org.apache.activemq</groupId>
<artifactId>apache-activemq</artifactId>
<version>5.16.0</version>
<classifier>bin</classifier>
<type>tar.gz</type>
<exclusions>
<exclusion>