File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
.github/test-app/src/test/java/io/github/kilmajster Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,20 @@ void should_start_ngrok_and_log_tunnel_details(CapturedOutput output) throws IOE
5252
5353 private String extractNgrokHttpsTunnelUrlFromLogs (CapturedOutput output ) {
5454 return Arrays .stream (StringUtils .split (output .toString (), " " ))
55- .filter (s -> s .startsWith ("https://" ) && s .contains (".ngrok.io" )).findFirst ().get ();
55+ .filter (this ::isNgrokAppLink ).findFirst ().get ();
56+ }
57+
58+ private boolean isNgrokAppLink (String s ) {
59+ return s != null
60+ && s .startsWith ("https://" )
61+ && StringUtils .containsAny (s , "ngrok.io" , "ngrok-free.app" , "ngrok.app" );
5662 }
5763
5864 private void waitForNgrokStartConfirmationInLogs (CapturedOutput output ) throws InterruptedException {
5965 for (int i = WAIT_FOR_STARTUP_SECONDS ; i > 0 ; i --) {
6066 Thread .sleep (1000 );
6167 if (output .toString ().contains ("Ngrok started successfully!" ) || output .toString ().contains ("Ngrok was already running!" )) {
68+ Thread .sleep (2000 );
6269 return ;
6370 }
6471 }
You can’t perform that action at this time.
0 commit comments