Skip to content

Commit 870bbc9

Browse files
author
Ace Nassri
authored
chore(functions/slack): fix flaky API call (GoogleCloudPlatform#6668)
1 parent 495742e commit 870bbc9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

functions/slack/src/test/java/functions/SlackSlashCommandTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public void handlesEmptyKgResultsTest() throws IOException, GeneralSecurityExcep
148148

149149
@Test
150150
public void handlesPopulatedKgResultsTest() throws IOException, GeneralSecurityException {
151-
String urlEncodedStr = "text=lion";
151+
String urlEncodedStr = "text=kolach";
152152
StringReader requestReadable = new StringReader(urlEncodedStr);
153153

154154
when(request.getReader()).thenReturn(new BufferedReader(requestReadable));
@@ -159,12 +159,12 @@ public void handlesPopulatedKgResultsTest() throws IOException, GeneralSecurityE
159159
functionInstance.service(request, response);
160160

161161
writerOut.flush();
162-
assertThat(responseOut.toString()).contains("https://en.wikipedia.org/wiki/Lion");
162+
assertThat(responseOut.toString()).contains("https://en.wikipedia.org/wiki/Kolach");
163163
}
164164

165165
@Test
166166
public void handlesMultipleUrlParamsTest() throws IOException, GeneralSecurityException {
167-
String urlEncodedStr = "unused=foo&text=lion";
167+
String urlEncodedStr = "unused=foo&text=kolach";
168168
StringReader requestReadable = new StringReader(urlEncodedStr);
169169

170170
when(request.getReader()).thenReturn(new BufferedReader(requestReadable));
@@ -175,6 +175,6 @@ public void handlesMultipleUrlParamsTest() throws IOException, GeneralSecurityEx
175175
functionInstance.service(request, response);
176176

177177
writerOut.flush();
178-
assertThat(responseOut.toString()).contains("https://en.wikipedia.org/wiki/Lion");
178+
assertThat(responseOut.toString()).contains("https://en.wikipedia.org/wiki/Kolach");
179179
}
180180
}

0 commit comments

Comments
 (0)