22
33import ch .qos .logback .classic .Level ;
44import ch .qos .logback .classic .Logger ;
5- import com .thoughtworks .xstream .XStream ;
65import jargs .gnu .CmdLineParser ;
76import jargs .gnu .CmdLineParser .Option ;
87import org .slf4j .LoggerFactory ;
1110import sc .networking .TcpNetwork ;
1211import sc .networking .clients .XStreamClient ;
1312import sc .plugin2021 .util .Constants ;
14- import sc .protocol .helpers .LobbyProtocol ;
1513import sc .protocol .requests .*;
1614import sc .protocol .responses .*;
1715import sc .server .Configuration ;
2119import java .io .IOException ;
2220import java .net .Socket ;
2321import java .util .Arrays ;
24- import java .util .Collection ;
2522import java .util .List ;
2623import java .util .concurrent .ExecutorService ;
2724import java .util .concurrent .Executors ;
@@ -132,7 +129,7 @@ public static void main(String[] args) {
132129 Runtime .getRuntime ().addShutdownHook (new Thread (server ::destroyForcibly ));
133130 Thread .sleep (1000 );
134131 }
135- testclient = new TestClient (Configuration . getXStream (), sc . plugin2020 . util . Configuration . getClassesToRegister (), host , port , numberOfTests );
132+ testclient = new TestClient (host , port , numberOfTests );
136133 Runtime .getRuntime ().addShutdownHook (new Thread (testclient ::printScores ));
137134 } catch (Exception e ) {
138135 logger .error ("Error while initializing: " + e .toString ());
@@ -155,11 +152,9 @@ public static void main(String[] args) {
155152
156153 private ExecutorService waiter = Executors .newSingleThreadExecutor ();
157154
158- public TestClient (XStream xstream , Collection <Class <?>> protocolClasses ,
159- String host , int port , int totalTests ) throws IOException {
160- super (xstream , createTcpNetwork (host , port ));
161- LobbyProtocol .registerMessages (xstream );
162- LobbyProtocol .registerAdditionalMessages (xstream , protocolClasses );
155+ public TestClient (String host , int port , int totalTests ) throws IOException {
156+ super (createTcpNetwork (host , port ));
157+
163158 this .host = host ;
164159 this .port = port ;
165160 this .totalTests = totalTests ;
0 commit comments