Tests: improved load test (added connection errors processing, fixed too long generated usernames, related to #10154);

This commit is contained in:
Oleg Agafonov 2023-04-05 18:43:16 +04:00
parent 4f583a853e
commit a9f1e15168
4 changed files with 26 additions and 7 deletions

View file

@ -602,6 +602,14 @@ public class SessionImpl implements Session {
return callbackClient.isConnected();
}
@Override
public Boolean isServerReady() {
// Is server works fine, possible use cases:
// - client connected by network, but can't process register/login process due errors like wrong username
// - client connected to broken server that has a wrong config or broken/miss libraries
return isConnected() && serverState != null && serverState.getGameTypes().size() > 0;
}
@Override
public PlayerType[] getPlayerTypes() {
return serverState.getPlayerTypes();

View file

@ -29,4 +29,6 @@ public interface ServerState {
String getVersionInfo();
Boolean isServerReady();
}