public class org.apache.zookeeper.test.MaxCnxnsTest extends org.apache.zookeeper.test.ClientBase
{
private static final int numCnxns;
java.util.concurrent.atomic.AtomicInteger numConnected;
java.lang.String host;
int port;
public void <init>()
{
java.util.concurrent.atomic.AtomicInteger v;
org.apache.zookeeper.test.MaxCnxnsTest v;
v := @this: org.apache.zookeeper.test.MaxCnxnsTest;
specialinvoke v.<org.apache.zookeeper.test.ClientBase: void <init>()>();
v = new java.util.concurrent.atomic.AtomicInteger;
specialinvoke v.<java.util.concurrent.atomic.AtomicInteger: void <init>(int)>(0);
v.<org.apache.zookeeper.test.MaxCnxnsTest: java.util.concurrent.atomic.AtomicInteger numConnected> = v;
return;
}
public void setUp() throws java.lang.Exception
{
org.apache.zookeeper.test.MaxCnxnsTest v;
v := @this: org.apache.zookeeper.test.MaxCnxnsTest;
v.<org.apache.zookeeper.test.MaxCnxnsTest: int maxCnxns> = 30;
specialinvoke v.<org.apache.zookeeper.test.ClientBase: void setUp()>();
return;
}
public void testMaxCnxns() throws java.io.IOException, java.lang.InterruptedException
{
org.apache.zookeeper.test.MaxCnxnsTest$CnxnThread[] v;
java.lang.String[] v;
java.lang.Integer v, v;
org.apache.zookeeper.test.MaxCnxnsTest$CnxnThread v, v, v;
java.util.concurrent.atomic.AtomicInteger v;
org.apache.zookeeper.test.MaxCnxnsTest v;
int v, v, v, v, v;
java.lang.String v, v, v;
v := @this: org.apache.zookeeper.test.MaxCnxnsTest;
v = v.<org.apache.zookeeper.test.MaxCnxnsTest: java.lang.String hostPort>;
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>(":");
v = v[0];
v.<org.apache.zookeeper.test.MaxCnxnsTest: java.lang.String host> = v;
v = v[1];
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
v.<org.apache.zookeeper.test.MaxCnxnsTest: int port> = v;
v = newarray (org.apache.zookeeper.test.MaxCnxnsTest$CnxnThread)[35];
v = 0;
label:
if v >= 30 goto label;
v = new org.apache.zookeeper.test.MaxCnxnsTest$CnxnThread;
specialinvoke v.<org.apache.zookeeper.test.MaxCnxnsTest$CnxnThread: void <init>(org.apache.zookeeper.test.MaxCnxnsTest,int)>(v, v);
v[v] = v;
v = v + 1;
goto label;
label:
v = 0;
label:
if v >= 30 goto label;
v = v[v];
virtualinvoke v.<org.apache.zookeeper.test.MaxCnxnsTest$CnxnThread: void start()>();
v = v + 1;
goto label;
label:
v = 0;
label:
if v >= 30 goto label;
v = v[v];
virtualinvoke v.<org.apache.zookeeper.test.MaxCnxnsTest$CnxnThread: void join()>();
v = v + 1;
goto label;
label:
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(30);
v = v.<org.apache.zookeeper.test.MaxCnxnsTest: java.util.concurrent.atomic.AtomicInteger numConnected>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int get()>();
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
staticinvoke <org.junit.jupiter.api.Assertions: void assertSame(java.lang.Object,java.lang.Object)>(v, v);
return;
}
}