Skip to content

Commit a21369a

Browse files
committed
Update Maven dependencies for Java FF.
This is the latest version of each dependency, as reported by `mvn versions:display-dependency-updates`, except for `javax.servlet:javax.servlet-api` where we don't want to go past 3.1 and `org.eclipse.jetty:jetty-*`, where we can go to a later 9.4 but not to 10. In both cases it is because the Servlet API has moved packages in ways that we don't want to have to deal with right now. Also change some assertEquals calls from JUnit 5, where we are using JUnit 4 everywhere else. These assertEquals calls had their parameters in the wrong order, which is a problem we can avoid by switching to Truth. PiperOrigin-RevId: 293211216
1 parent 5e02d3a commit a21369a

File tree

3 files changed

+41
-47
lines changed

3 files changed

+41
-47
lines changed

invoker/core/pom.xml

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -43,58 +43,58 @@
4343
<artifactId>functions-framework-api</artifactId>
4444
</dependency>
4545
<dependency>
46-
<groupId>javax.servlet</groupId>
47-
<artifactId>javax.servlet-api</artifactId>
48-
<version>3.1.0</version>
46+
<groupId>javax.servlet</groupId>
47+
<artifactId>javax.servlet-api</artifactId>
48+
<version>3.1.0</version>
4949
</dependency>
5050
<dependency>
5151
<groupId>io.cloudevents</groupId>
5252
<artifactId>cloudevents-api</artifactId>
5353
<version>1.2.0</version>
5454
</dependency>
5555
<dependency>
56-
<groupId>javax.annotation</groupId>
57-
<artifactId>javax.annotation-api</artifactId>
58-
<version>1.3.2</version>
56+
<groupId>javax.annotation</groupId>
57+
<artifactId>javax.annotation-api</artifactId>
58+
<version>1.3.2</version>
5959
</dependency>
6060
<dependency>
61-
<groupId>com.google.code.gson</groupId>
62-
<artifactId>gson</artifactId>
63-
<version>2.8.6</version>
61+
<groupId>com.google.code.gson</groupId>
62+
<artifactId>gson</artifactId>
63+
<version>2.8.6</version>
6464
</dependency>
6565
<dependency>
66-
<groupId>com.ryanharter.auto.value</groupId>
67-
<artifactId>auto-value-gson</artifactId>
68-
<version>0.8.0</version>
69-
<scope>provided</scope>
66+
<groupId>com.ryanharter.auto.value</groupId>
67+
<artifactId>auto-value-gson</artifactId>
68+
<version>1.3.0</version>
69+
<scope>provided</scope>
7070
</dependency>
7171
<dependency>
72-
<groupId>com.ryanharter.auto.value</groupId>
73-
<artifactId>auto-value-gson-annotations</artifactId>
74-
<version>0.8.0</version>
75-
<scope>provided</scope>
72+
<groupId>com.ryanharter.auto.value</groupId>
73+
<artifactId>auto-value-gson-annotations</artifactId>
74+
<version>0.8.0</version>
75+
<scope>provided</scope>
7676
</dependency>
7777
<dependency>
78-
<groupId>com.google.auto.value</groupId>
79-
<artifactId>auto-value</artifactId>
80-
<version>1.6.2</version>
81-
<scope>provided</scope>
78+
<groupId>com.google.auto.value</groupId>
79+
<artifactId>auto-value</artifactId>
80+
<version>1.7</version>
81+
<scope>provided</scope>
8282
</dependency>
8383
<dependency>
84-
<groupId>com.google.auto.value</groupId>
85-
<artifactId>auto-value-annotations</artifactId>
86-
<version>1.6.2</version>
87-
<scope>provided</scope>
84+
<groupId>com.google.auto.value</groupId>
85+
<artifactId>auto-value-annotations</artifactId>
86+
<version>1.7</version>
87+
<scope>provided</scope>
8888
</dependency>
8989
<dependency>
90-
<groupId>org.eclipse.jetty</groupId>
91-
<artifactId>jetty-servlet</artifactId>
92-
<version>9.4.11.v20180605</version>
90+
<groupId>org.eclipse.jetty</groupId>
91+
<artifactId>jetty-servlet</artifactId>
92+
<version>9.4.26.v20200117</version>
9393
</dependency>
9494
<dependency>
95-
<groupId>org.eclipse.jetty</groupId>
96-
<artifactId>jetty-server</artifactId>
97-
<version>9.4.11.v20180605</version>
95+
<groupId>org.eclipse.jetty</groupId>
96+
<artifactId>jetty-server</artifactId>
97+
<version>9.4.26.v20200117</version>
9898
</dependency>
9999
<dependency>
100100
<groupId>com.beust</groupId>
@@ -113,37 +113,31 @@
113113
<dependency>
114114
<groupId>org.mockito</groupId>
115115
<artifactId>mockito-core</artifactId>
116-
<version>2.21.0</version>
117-
<scope>test</scope>
118-
</dependency>
119-
<dependency>
120-
<groupId>org.mockito</groupId>
121-
<artifactId>mockito-junit-jupiter</artifactId>
122-
<version>2.23.0</version>
116+
<version>3.2.4</version>
123117
<scope>test</scope>
124118
</dependency>
125119
<dependency>
126120
<groupId>junit</groupId>
127121
<artifactId>junit</artifactId>
128-
<version>4.12</version>
122+
<version>4.13</version>
129123
<scope>test</scope>
130124
</dependency>
131125
<dependency>
132126
<groupId>com.google.truth</groupId>
133127
<artifactId>truth</artifactId>
134-
<version>1.0</version>
128+
<version>1.0.1</version>
135129
<scope>test</scope>
136130
</dependency>
137131
<dependency>
138132
<groupId>com.google.truth.extensions</groupId>
139133
<artifactId>truth-java8-extension</artifactId>
140-
<version>1.0</version>
134+
<version>1.0.1</version>
141135
<scope>test</scope>
142136
</dependency>
143137
<dependency>
144138
<groupId>org.eclipse.jetty</groupId>
145139
<artifactId>jetty-client</artifactId>
146-
<version>9.4.11.v20180605</version>
140+
<version>9.4.26.v20200117</version>
147141
<scope>test</scope>
148142
</dependency>
149143
</dependencies>

invoker/core/src/test/java/com/google/cloud/functions/invoker/BackgroundFunctionTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.google.cloud.functions.invoker;
22

3-
import static org.junit.jupiter.api.Assertions.assertEquals;
3+
import static com.google.common.truth.Truth.assertThat;
44

55
import com.google.cloud.functions.Context;
66
import com.google.gson.JsonElement;
@@ -81,7 +81,7 @@ public void adder() throws Exception {
8181

8282
executor.service(req, res);
8383

84-
assertEquals(lastSum, 5);
85-
assertEquals(lastEventType, "com.example.someevent.new");
84+
assertThat(lastSum).isEqualTo(5);
85+
assertThat(lastEventType).isEqualTo("com.example.someevent.new");
8686
}
8787
}

invoker/core/src/test/java/com/google/cloud/functions/invoker/HttpFunctionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.google.cloud.functions.invoker;
22

3-
import static org.junit.jupiter.api.Assertions.assertEquals;
3+
import static com.google.common.truth.Truth.assertThat;
44

55
import java.io.FileNotFoundException;
66
import java.io.IOException;
@@ -40,7 +40,7 @@ public void adder() throws Exception {
4040

4141
executor.service(req, res);
4242

43-
assertEquals(lastResponse, requestData);
43+
assertThat(lastResponse).isEqualTo(requestData);
4444
}
4545

4646
private class MockPrintWriter extends java.io.PrintWriter {

0 commit comments

Comments
 (0)