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

1.10.x release - update dependencies + unit tests #2413

Merged
merged 1 commit into from
Nov 16, 2023
Merged
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
2 changes: 1 addition & 1 deletion clients/java/zts/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.9.9</version>
<version>3.10.8</version>
</dependency>

<!-- Test dependencies -->
Expand Down
2 changes: 1 addition & 1 deletion containers/jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<dependency>
<groupId>com.gu</groupId>
<artifactId>kinesis-logback-appender</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
14 changes: 7 additions & 7 deletions libs/java/server_common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client</artifactId>
<version>2.10.2</version>
<version>3.1.1</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
Expand All @@ -61,7 +61,7 @@
<dependency>
<groupId>com.fasterxml.uuid</groupId>
<artifactId>java-uuid-generator</artifactId>
<version>4.0.1</version>
<version>4.3.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -188,17 +188,17 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.19.6</version>
<version>3.24.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.9.0</version>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.11.1</version>
<version>2.12.0</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
Expand Down Expand Up @@ -253,7 +253,7 @@
<dependency>
<groupId>uk.co.datumedge</groupId>
<artifactId>hamcrest-json</artifactId>
<version>0.2</version>
<version>0.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -265,7 +265,7 @@
<dependency>
<groupId>com.amazonaws.secretsmanager</groupId>
<artifactId>aws-secretsmanager-jdbc</artifactId>
<version>1.0.8</version>
<version>2.0.0</version>
</dependency>

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,18 @@ public void testStartStopConnectionFailedHandshake() throws Exception {
when(mockConnection2.getEndPoint().isOpen()).thenReturn(false);

jettyConnectionLogger.handshakeFailed(event, sslHandshakeException);

Mockito.verify(connectionLog, Mockito.times(1)).log(connectionLogEntryArgumentCaptor.capture());
Mockito.verify(metric, Mockito.times(1)).increment(Mockito.eq(CONNECTION_LOGGER_METRIC_DEFAULT_NAME), metricArgumentCaptor.capture());
assertEquals("no cipher suites in common", connectionLogEntryArgumentCaptor.getValue().sslHandshakeFailureMessage().get());
assertFalse(connectionLogEntryArgumentCaptor.getValue().sslHandshakeFailureCause().isPresent());
List<String[]> allMetricValues = metricArgumentCaptor.getAllValues();
assertEquals(2, allMetricValues.size());
assertEquals("failureType", allMetricValues.get(0));
assertEquals("INCOMPATIBLE_CLIENT_CIPHER_SUITES", allMetricValues.get(1));
assertEquals(allMetricValues.size(), 1);
String[] testValue = allMetricValues.get(0);
assertEquals(testValue.length, 2);
assertEquals("failureType", testValue[0]);
assertEquals("INCOMPATIBLE_CLIENT_CIPHER_SUITES", testValue[1]);
jettyConnectionLogger.doStop();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,23 @@ public void testNotify() {
assertEquals("athenz_notification", captorMetric.getAllValues().get(1));

// Mockito captures all varargs arguments in a single array
assertEquals(12, captorAttributes.getAllValues().size());

List<String> expectedAttributes = new ArrayList<String>(Arrays.asList(
assertEquals(2, captorAttributes.getAllValues().size());

String[] collectedAttributes1 = captorAttributes.getAllValues().get(0);
assertEquals(6, collectedAttributes1.length);
List<String> expectedAttributes1 = Arrays.asList(
"key1", "attribute11",
"key2", "attribute12",
"key3", "attribute13",
"key3", "attribute13");
assertEquals(expectedAttributes1, Arrays.asList(collectedAttributes1));

String[] collectedAttributes2 = captorAttributes.getAllValues().get(1);
assertEquals(6, collectedAttributes2.length);
List<String> expectedAttributes2 = Arrays.asList(
"key1", "attribute21",
"key2", "attribute22",
"key3", "attribute23"
));

assertEquals(expectedAttributes, captorAttributes.getAllValues());
"key3", "attribute23");
assertEquals(expectedAttributes2, Arrays.asList(collectedAttributes2));
}
}
30 changes: 15 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,27 @@
</ciManagement>

<properties>
<jetty.version>9.4.49.v20220914</jetty.version>
<jersey.version>2.37</jersey.version>
<jackson.version>2.13.4</jackson.version>
<jackson-databind.version>2.13.4.2</jackson-databind.version>
<jetty.version>9.4.53.v20231009</jetty.version>
<jersey.version>2.41</jersey.version>
<jackson.version>2.14.3</jackson.version>
<jackson-databind.version>2.14.3</jackson-databind.version>
<rdl.version>1.5.4</rdl.version>
<bouncycastle.version>1.75</bouncycastle.version>
<aws.version>1.12.325</aws.version>
<aws2.version>2.17.294</aws2.version>
<guava.version>31.1-jre</guava.version>
<bouncycastle.version>1.77</bouncycastle.version>
<aws.version>1.12.590</aws.version>
<aws2.version>2.21.24</aws2.version>
<guava.version>32.1.3-jre</guava.version>
<slf4j.version>1.7.36</slf4j.version>
<logback.version>1.2.11</logback.version>
<logback.version>1.2.12</logback.version>
<javax.version>3.1.0</javax.version>
<javax.ws.version>2.1.1</javax.ws.version>
<mockito.version>4.8.1</mockito.version>
<mockito.version>4.11.0</mockito.version>
<jmockit.version>1.49</jmockit.version>
<jjwt.version>0.11.5</jjwt.version>
<jaxb.version>2.3.3</jaxb.version>
<nimbus.jose.version>9.25.6</nimbus.jose.version>
<mysql.connector.version>8.0.31</mysql.connector.version>
<commons.daemon.version>1.3.2</commons.daemon.version>
<apache.httpclient.version>4.5.13</apache.httpclient.version>
<nimbus.jose.version>9.37.1</nimbus.jose.version>
<mysql.connector.version>8.0.33</mysql.connector.version>
<commons.daemon.version>1.3.4</commons.daemon.version>
<apache.httpclient.version>4.5.14</apache.httpclient.version>
<jboss.resteasy.version>4.7.5.Final</jboss.resteasy.version>
<maven-surefire-plugin.version>3.0.0-M6</maven-surefire-plugin.version>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
Expand All @@ -100,7 +100,7 @@
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<exec-maven-plugin.version>1.1.1</exec-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<swagger.version>2.2.4</swagger.version>
<swagger.version>2.2.19</swagger.version>
<hamcrest.version>2.2</hamcrest.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand Down
24 changes: 17 additions & 7 deletions screwdriver/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ function deployProject ()
max_retry=3
counter=0
echo "Publishing package $1..."
until mvn -B deploy -P ossrh -Dmaven.test.skip=true --projects $1 --settings screwdriver/settings/settings-publish.xml
do
[[ counter -eq $max_retry ]] && echo "Failed to deploy package $1" && exit 1
counter=$(( $counter + 1 ))
sleep 30
echo "Re-trying to publish package (attempt #$counter)"
done

# before publishing we need to make sure that the package
# is not being asked to be skipped since it was already
# published in a previous build

if [[ $PUBLISH_SKIP_PACKAGES == *"$1"* ]]
then
echo "Package $1 already published. Skipping..."
else
until mvn -B deploy -P ossrh -Dmaven.test.skip=true --projects $1 --settings screwdriver/settings/settings-publish.xml
do
[[ counter -eq $max_retry ]] && echo "Failed to deploy package $1" && exit 1
counter=$(( $counter + 1 ))
sleep 30
echo "Re-trying to publish package (attempt #$counter)"
done
fi
}

# for openssl 1.1+ we need to add -pbkdf2 to remove the
Expand Down