MCPcopy Create free account
hub / github.com/e2wugui/zeze / setUp

Method setUp

ZezeJava/ZezeJavaTest/src/UnitTest/Zeze/Game/TestRank.java:23–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 private boolean disableTest = false;
22
23 @Override
24 protected void setUp() {
25 var config = Zeze.Config.load();
26 if (config.getGlobalCacheManagerHostNameOrAddress().contains(".xml")) {
27 System.out.println("Test Rank Disable On GlobL-Raft.");
28 disableTest = true;
29 return;
30 }
31
32 System.out.println("------ setUp begin");
33 try {
34 for (int i = 0; i < APP_COUNT; i++)
35 (apps[i] = new SimpleApp(SERVER_ID_BEGIN + i)).start();
36
37 System.out.println("Begin Thread.sleep");
38 Thread.sleep(2000); // wait connected
39 for (int i = 0; i < APP_COUNT; i++) {
40 System.out.format("End Thread.sleep app%d:%n", SERVER_ID_BEGIN + i);
41 apps[i].getZeze().getServiceManager().getSubscribeStates().forEach((name, state) -> {
42 System.out.format(" '%s':%n", name);
43 state.getLocalStates().forEach((k, v) -> System.out.format(" { %s, %s }%n", k, v));
44 });
45 }
46 } catch (Exception e) {
47 throw new RuntimeException(e);
48 } finally {
49 System.out.println("------ setUp end");
50 }
51 }
52
53 @Override
54 protected void tearDown() {

Callers 1

mainMethod · 0.95

Calls 11

formatMethod · 0.80
getSubscribeStatesMethod · 0.80
getLocalStatesMethod · 0.80
containsMethod · 0.65
startMethod · 0.65
getZezeMethod · 0.65
loadMethod · 0.45
sleepMethod · 0.45
forEachMethod · 0.45
getServiceManagerMethod · 0.45

Tested by

no test coverage detected