Skip to content

Commit

Permalink
Downgrade to Java 11, fix missed test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgros committed Aug 28, 2024
1 parent cfd2413 commit fc39d67
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ description: 'Build SWC'
runs:
using: 'composite'
steps:
- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '11'
distribution: 'corretto'
cache: maven
- name: Build with Maven
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<properties>
<!-- Synapse Web Client -->
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<webappDirectory>
${project.build.directory}/${project.build.finalName}
</webappDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Matchers.anyList;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
Expand Down Expand Up @@ -63,8 +64,7 @@ public void setup()
throws IOException, SynapseException, JSONObjectAdapterException {
MockitoAnnotations.initMocks(this);
servlet = new AliasRedirectorServlet();
when(mockSynapseProvider.createNewClient(anyString()))
.thenReturn(mockSynapse);
when(mockSynapseProvider.createNewClient(any())).thenReturn(mockSynapse);

servlet.setSynapseProvider(mockSynapseProvider);

Expand Down Expand Up @@ -148,8 +148,9 @@ public void testDoGetTeamAlias() throws Exception {
@Test
public void testDoGetError() throws Exception {
String errorMessage = "An error from the service call";
when(mockSynapse.getUserGroupHeadersByAliases(anyList()))
when(mockSynapse.getUserGroupHeadersByAliases(any()))
.thenThrow(new SynapseForbiddenException(errorMessage));

servlet.doGet(mockRequest, mockResponse);

// redirects to an error place
Expand Down

0 comments on commit fc39d67

Please sign in to comment.