Skip to content

Commit

Permalink
Updated RunRspConnectorsTests. Added verification for "Stop RSP".
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Korniienko <olkornii@redhat.com>
  • Loading branch information
olkornii committed Nov 2, 2023
1 parent f7c56f0 commit 8c0e51d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ public static boolean isRspServerStarted(ComponentFixture rspViewTree, int serve
RemoteText server = rspViewTree.findAllText().get(serverNumber);
return server.getText().contains("[STARTED]");
}

public static boolean isRspServerStopped(ComponentFixture rspViewTree, int serverNumber){
RemoteText server = rspViewTree.findAllText().get(serverNumber);
return server.getText().contains("[STOPPED]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ public static void runRspServers(RemoteRobot robot, ComponentFixture rspViewTree
contextMenu.select("Download / Update RSP");
final IdeStatusBar ideStatusBar = robot.find(IdeStatusBar.class);
ideStatusBar.waitUntilAllBgTasksFinish();

rspViewTree.findAllText().get(serverNumber).click(MouseButton.RIGHT_BUTTON);
contextMenu = robot.find(RightClickMenu.class, Duration.ofSeconds(10));
contextMenu.select("Start RSP");
waitFor(Duration.ofSeconds(15), Duration.ofSeconds(1), "Server did not started.", () -> isRspServerStarted(rspViewTree ,serverNumber));

rspViewTree.findAllText().get(serverNumber).click(MouseButton.RIGHT_BUTTON);
contextMenu = robot.find(RightClickMenu.class, Duration.ofSeconds(10));
contextMenu.select("Stop RSP");
waitFor(Duration.ofSeconds(15), Duration.ofSeconds(1), "Server did not stopped.", () -> isRspServerStopped(rspViewTree ,serverNumber));
}
}
}

0 comments on commit 8c0e51d

Please sign in to comment.