mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Tests: improved load test (added connection errors processing, fixed too long generated usernames, related to #10154);
This commit is contained in:
parent
4f583a853e
commit
a9f1e15168
4 changed files with 26 additions and 7 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -29,4 +29,6 @@ public interface ServerState {
|
|||
|
||||
String getVersionInfo();
|
||||
|
||||
Boolean isServerReady();
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue