public abstract class org.apache.zookeeper.test.ClientBase extends org.apache.zookeeper.ZKTestCase
{
protected static final org.slf4j.Logger LOG;
public static int CONNECTION_TIMEOUT;
protected java.lang.String hostPort;
protected int maxCnxns;
protected org.apache.zookeeper.server.ServerCnxnFactory serverFactory;
protected java.io.File tmpDir;
protected boolean exceptionOnFailedConnect;
long initialFdCount;
private java.util.List allClients;
private boolean allClientsSetup;
public void <init>()
{
int v;
java.lang.String v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
specialinvoke v.<org.apache.zookeeper.ZKTestCase: void <init>()>();
v = staticinvoke <org.apache.zookeeper.PortAssignment: int unique()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("127.0.0.1:\u0001");
v.<org.apache.zookeeper.test.ClientBase: java.lang.String hostPort> = v;
v.<org.apache.zookeeper.test.ClientBase: int maxCnxns> = 0;
v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.server.ServerCnxnFactory serverFactory> = null;
v.<org.apache.zookeeper.test.ClientBase: java.io.File tmpDir> = null;
v.<org.apache.zookeeper.test.ClientBase: boolean exceptionOnFailedConnect> = 0;
v.<org.apache.zookeeper.test.ClientBase: boolean allClientsSetup> = 0;
return;
}
protected org.apache.zookeeper.TestableZooKeeper createClient() throws java.io.IOException, java.lang.InterruptedException
{
java.lang.String v;
org.apache.zookeeper.TestableZooKeeper v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v = v.<org.apache.zookeeper.test.ClientBase: java.lang.String hostPort>;
v = virtualinvoke v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.TestableZooKeeper createClient(java.lang.String)>(v);
return v;
}
protected org.apache.zookeeper.TestableZooKeeper createClient(java.lang.String) throws java.io.IOException, java.lang.InterruptedException
{
org.apache.zookeeper.TestableZooKeeper v;
java.lang.String v;
org.apache.zookeeper.test.ClientBase$CountdownWatcher v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v := @parameter: java.lang.String;
v = new org.apache.zookeeper.test.ClientBase$CountdownWatcher;
specialinvoke v.<org.apache.zookeeper.test.ClientBase$CountdownWatcher: void <init>()>();
v = virtualinvoke v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.TestableZooKeeper createClient(org.apache.zookeeper.test.ClientBase$CountdownWatcher,java.lang.String)>(v, v);
return v;
}
protected org.apache.zookeeper.TestableZooKeeper createClient(org.apache.zookeeper.test.ClientBase$CountdownWatcher) throws java.io.IOException, java.lang.InterruptedException
{
org.apache.zookeeper.TestableZooKeeper v;
java.lang.String v;
org.apache.zookeeper.test.ClientBase$CountdownWatcher v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v := @parameter: org.apache.zookeeper.test.ClientBase$CountdownWatcher;
v = v.<org.apache.zookeeper.test.ClientBase: java.lang.String hostPort>;
v = virtualinvoke v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.TestableZooKeeper createClient(org.apache.zookeeper.test.ClientBase$CountdownWatcher,java.lang.String)>(v, v);
return v;
}
protected org.apache.zookeeper.TestableZooKeeper createClient(org.apache.zookeeper.test.ClientBase$CountdownWatcher, java.lang.String) throws java.io.IOException, java.lang.InterruptedException
{
org.apache.zookeeper.TestableZooKeeper v;
int v;
java.lang.String v;
org.apache.zookeeper.test.ClientBase$CountdownWatcher v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v := @parameter: org.apache.zookeeper.test.ClientBase$CountdownWatcher;
v := @parameter: java.lang.String;
v = <org.apache.zookeeper.test.ClientBase: int CONNECTION_TIMEOUT>;
v = virtualinvoke v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.TestableZooKeeper createClient(org.apache.zookeeper.test.ClientBase$CountdownWatcher,java.lang.String,int)>(v, v, v);
return v;
}
protected org.apache.zookeeper.TestableZooKeeper createClient(org.apache.zookeeper.test.ClientBase$CountdownWatcher, java.lang.String, int) throws java.io.IOException, java.lang.InterruptedException
{
java.lang.Throwable v;
java.lang.String[] v;
long v;
org.apache.zookeeper.test.ClientBase$CountdownWatcher v;
int v;
java.lang.String v, v;
boolean v, v, v;
org.slf4j.Logger v;
java.util.concurrent.TimeUnit v;
java.util.concurrent.CountDownLatch v;
java.net.ProtocolException v;
java.util.List v, v;
org.apache.zookeeper.TestableZooKeeper v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v := @parameter: org.apache.zookeeper.test.ClientBase$CountdownWatcher;
v := @parameter: java.lang.String;
v := @parameter: int;
virtualinvoke v.<org.apache.zookeeper.test.ClientBase$CountdownWatcher: void reset()>();
v = new org.apache.zookeeper.TestableZooKeeper;
specialinvoke v.<org.apache.zookeeper.TestableZooKeeper: void <init>(java.lang.String,int,org.apache.zookeeper.Watcher)>(v, v, v);
v = v.<org.apache.zookeeper.test.ClientBase$CountdownWatcher: java.util.concurrent.CountDownLatch clientConnected>;
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit MILLISECONDS>;
v = virtualinvoke v.<java.util.concurrent.CountDownLatch: boolean await(long,java.util.concurrent.TimeUnit)>(v, v);
if v != 0 goto label;
v = v.<org.apache.zookeeper.test.ClientBase: boolean exceptionOnFailedConnect>;
if v == 0 goto label;
v = new java.net.ProtocolException;
specialinvoke v.<java.net.ProtocolException: void <init>(java.lang.String)>("Unable to connect to server");
throw v;
label:
staticinvoke <org.junit.jupiter.api.Assertions: java.lang.Object fail(java.lang.String)>("Unable to connect to server");
label:
entermonitor v;
label:
v = v.<org.apache.zookeeper.test.ClientBase: boolean allClientsSetup>;
if v != 0 goto label;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String)>("allClients never setup");
staticinvoke <org.junit.jupiter.api.Assertions: java.lang.Object fail(java.lang.String)>("allClients never setup");
label:
v = v.<org.apache.zookeeper.test.ClientBase: java.util.List allClients>;
if v == null goto label;
v = v.<org.apache.zookeeper.test.ClientBase: java.util.List allClients>;
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
v = newarray (java.lang.String)[1];
v = virtualinvoke v.<org.apache.zookeeper.TestableZooKeeper: long getSessionId()>();
v = staticinvoke <org.apache.zookeeper.test.ClientBase: java.lang.String getHexSessionId(long)>(v);
v[0] = v;
staticinvoke <org.apache.zookeeper.test.JMXEnv: java.util.Set ensureAll(java.lang.String[])>(v);
goto label;
label:
virtualinvoke v.<org.apache.zookeeper.TestableZooKeeper: void close()>();
label:
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
return v;
catch java.lang.Throwable from label to label with label;
}
public static java.util.List parseHostPortList(java.lang.String)
{
java.lang.String[] v;
java.util.ArrayList v;
int v, v, v, v, v;
java.lang.String v, v, v, v, v, v;
org.apache.zookeeper.test.ClientBase$HostPort v;
java.lang.RuntimeException v, v;
v := @parameter: java.lang.String;
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>(",");
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = virtualinvoke v.<java.lang.String: int lastIndexOf(int)>(58);
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int,int)>(0, v);
label:
v = v + 1;
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int)>(v);
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
label:
goto label;
label:
v := @caughtexception;
v = new java.lang.RuntimeException;
v = virtualinvoke v.<java.lang.RuntimeException: java.lang.String toString()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Problem parsing \u0001\u0001");
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.String)>(v);
throw v;
label:
v = new org.apache.zookeeper.test.ClientBase$HostPort;
specialinvoke v.<org.apache.zookeeper.test.ClientBase$HostPort: void <init>(java.lang.String,int)>(v, v);
virtualinvoke v.<java.util.ArrayList: boolean add(java.lang.Object)>(v);
v = v + 1;
goto label;
label:
return v;
catch java.lang.RuntimeException from label to label with label;
}
public static boolean waitForServerUp(java.lang.String, long)
{
long v;
java.lang.String v;
boolean v;
v := @parameter: java.lang.String;
v := @parameter: long;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: boolean waitForServerUp(java.lang.String,long,boolean)>(v, v, 0);
return v;
}
public static boolean waitForServerUp(java.lang.String, long, boolean)
{
java.lang.Throwable v;
long v, v, v, v;
byte v;
int v;
java.net.ConnectException v;
java.lang.String v, v, v, v;
boolean v, v, v;
org.slf4j.Logger v, v, v;
java.io.IOException v;
java.util.List v;
java.lang.InterruptedException v;
java.lang.Object v;
v := @parameter: java.lang.String;
v := @parameter: long;
v := @parameter: boolean;
v = staticinvoke <org.apache.zookeeper.common.Time: long currentElapsedTime()>();
label:
v = staticinvoke <org.apache.zookeeper.test.ClientBase: java.util.List parseHostPortList(java.lang.String)>(v);
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = v.<org.apache.zookeeper.test.ClientBase$HostPort: java.lang.String host>;
v = v.<org.apache.zookeeper.test.ClientBase$HostPort: int port>;
v = staticinvoke <org.apache.zookeeper.client.FourLetterWordMain: java.lang.String send4LetterWord(java.lang.String,int,java.lang.String,boolean)>(v, v, "stat", v);
v = virtualinvoke v.<java.lang.String: boolean startsWith(java.lang.String)>("Zookeeper version:");
if v == 0 goto label;
v = virtualinvoke v.<java.lang.String: boolean contains(java.lang.CharSequence)>("READ-ONLY");
if v != 0 goto label;
label:
return 1;
label:
v := @caughtexception;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = virtualinvoke v.<java.net.ConnectException: java.lang.String toString()>();
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object,java.lang.Object)>("server {} not up: {}", v, v);
goto label;
label:
v := @caughtexception;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object,java.lang.Object)>("server {} not up", v, v);
goto label;
label:
v := @caughtexception;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String,java.lang.Object,java.lang.Object)>("server {} not up", v, v);
label:
v = staticinvoke <org.apache.zookeeper.common.Time: long currentElapsedTime()>();
v = v + v;
v = v cmp v;
if v > 0 goto label;
label:
staticinvoke <java.lang.Thread: void sleep(long)>(250L);
label:
goto label;
label:
v := @caughtexception;
goto label;
label:
return 0;
catch java.net.ConnectException from label to label with label;
catch java.io.IOException from label to label with label;
catch org.apache.zookeeper.common.X509Exception$SSLContextException from label to label with label;
catch java.lang.InterruptedException from label to label with label;
}
public static boolean waitForServerDown(java.lang.String, long)
{
long v;
java.lang.String v;
boolean v;
v := @parameter: java.lang.String;
v := @parameter: long;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: boolean waitForServerDown(java.lang.String,long,boolean)>(v, v, 0);
return v;
}
public static boolean waitForServerDown(java.lang.String, long, boolean)
{
java.lang.Throwable v;
java.io.IOException v;
long v, v, v, v;
java.util.List v;
byte v;
java.lang.InterruptedException v;
int v;
java.lang.Object v;
java.lang.String v, v;
boolean v;
v := @parameter: java.lang.String;
v := @parameter: long;
v := @parameter: boolean;
v = staticinvoke <org.apache.zookeeper.common.Time: long currentElapsedTime()>();
label:
v = staticinvoke <org.apache.zookeeper.test.ClientBase: java.util.List parseHostPortList(java.lang.String)>(v);
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = v.<org.apache.zookeeper.test.ClientBase$HostPort: java.lang.String host>;
v = v.<org.apache.zookeeper.test.ClientBase$HostPort: int port>;
staticinvoke <org.apache.zookeeper.client.FourLetterWordMain: java.lang.String send4LetterWord(java.lang.String,int,java.lang.String,boolean)>(v, v, "stat", v);
label:
goto label;
label:
v := @caughtexception;
return 1;
label:
v := @caughtexception;
return 1;
label:
v = staticinvoke <org.apache.zookeeper.common.Time: long currentElapsedTime()>();
v = v + v;
v = v cmp v;
if v > 0 goto label;
label:
staticinvoke <java.lang.Thread: void sleep(long)>(250L);
label:
goto label;
label:
v := @caughtexception;
goto label;
label:
return 0;
catch java.io.IOException from label to label with label;
catch org.apache.zookeeper.common.X509Exception$SSLContextException from label to label with label;
catch java.lang.InterruptedException from label to label with label;
}
public static transient boolean waitForServerState(org.apache.zookeeper.server.quorum.QuorumPeer, int, java.lang.String[])
{
org.apache.zookeeper.server.quorum.QuorumPeer v;
java.lang.String[] v;
long v, v, v;
byte v;
java.lang.InterruptedException v;
int v, v, v;
java.lang.String v, v;
boolean v;
v := @parameter: org.apache.zookeeper.server.quorum.QuorumPeer;
v := @parameter: int;
v := @parameter: java.lang.String[];
v = staticinvoke <org.apache.zookeeper.common.Time: long currentElapsedTime()>();
label:
staticinvoke <java.lang.Thread: void sleep(long)>(250L);
label:
goto label;
label:
v := @caughtexception;
label:
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = virtualinvoke v.<org.apache.zookeeper.server.quorum.QuorumPeer: java.lang.String getServerState()>();
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
return 1;
label:
v = v + 1;
goto label;
label:
v = staticinvoke <org.apache.zookeeper.common.Time: long currentElapsedTime()>();
v = v + v;
v = v cmp v;
if v <= 0 goto label;
return 0;
catch java.lang.InterruptedException from label to label with label;
}
static void verifyThreadTerminated(java.lang.Thread, long) throws java.lang.InterruptedException
{
org.slf4j.Logger v;
long v;
java.lang.StackTraceElement[] v;
java.lang.Thread v;
java.lang.String v, v, v, v;
boolean v;
v := @parameter: java.lang.Thread;
v := @parameter: long;
virtualinvoke v.<java.lang.Thread: void join(long)>(v);
v = virtualinvoke v.<java.lang.Thread: boolean isAlive()>();
if v == 0 goto label;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = virtualinvoke v.<java.lang.Thread: java.lang.String getName()>();
v = virtualinvoke v.<java.lang.Thread: java.lang.StackTraceElement[] getStackTrace()>();
v = staticinvoke <java.util.Arrays: java.lang.String toString(java.lang.Object[])>(v);
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String,java.lang.Object,java.lang.Object)>("Thread {} : {}", v, v);
v = virtualinvoke v.<java.lang.Thread: java.lang.String getName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("thread \u still alive after join");
staticinvoke <org.junit.jupiter.api.Assertions: void assertFalse(boolean,java.lang.String)>(1, v);
label:
return;
}
public static java.io.File createEmptyTestDir() throws java.io.IOException
{
java.io.File v, v;
v = <org.apache.zookeeper.test.ClientBase: java.io.File testBaseDir>;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: java.io.File createTmpDir(java.io.File,boolean)>(v, 0);
return v;
}
public static java.io.File createTmpDir() throws java.io.IOException
{
java.io.File v, v;
v = <org.apache.zookeeper.test.ClientBase: java.io.File testBaseDir>;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: java.io.File createTmpDir(java.io.File,boolean)>(v, 1);
return v;
}
static java.io.File createTmpDir(java.io.File, boolean) throws java.io.IOException
{
java.io.File v, v, v;
java.lang.String v;
boolean v, v, v, v;
v := @parameter: java.io.File;
v := @parameter: boolean;
v = virtualinvoke v.<java.io.File: boolean exists()>();
if v != 0 goto label;
virtualinvoke v.<java.io.File: boolean mkdir()>();
label:
v = staticinvoke <java.io.File: java.io.File createTempFile(java.lang.String,java.lang.String,java.io.File)>("test", ".junit", v);
v = new java.io.File;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.io.File)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u.dir");
specialinvoke v.<java.io.File: void <init>(java.lang.String)>(v);
v = virtualinvoke v.<java.io.File: boolean exists()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertFalse(boolean)>(v);
v = virtualinvoke v.<java.io.File: boolean mkdirs()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertTrue(boolean)>(v);
if v == 0 goto label;
staticinvoke <org.apache.zookeeper.test.ClientBase: void createInitializeFile(java.io.File)>(v);
label:
return v;
}
public static void createInitializeFile(java.io.File) throws java.io.IOException
{
java.io.File v, v;
boolean v, v;
v := @parameter: java.io.File;
v = new java.io.File;
specialinvoke v.<java.io.File: void <init>(java.io.File,java.lang.String)>(v, "initialize");
v = virtualinvoke v.<java.io.File: boolean exists()>();
if v != 0 goto label;
v = virtualinvoke v.<java.io.File: boolean createNewFile()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertTrue(boolean)>(v);
label:
return;
}
private static int getPort(java.lang.String)
{
java.lang.String[] v, v;
int v, v, v, v;
java.lang.String v, v;
v := @parameter: java.lang.String;
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>(":");
v = lengthof v;
v = v - 1;
v = v[v];
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>("/");
v = lengthof v;
if v <= 1 goto label;
v = v[0];
label:
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
return v;
}
public static void startServerInstance(java.io.File, org.apache.zookeeper.server.ServerCnxnFactory, java.lang.String, int) throws java.io.IOException, java.lang.InterruptedException
{
org.slf4j.Logger v;
org.apache.zookeeper.server.ServerCnxnFactory v;
java.lang.Integer v;
java.io.File v;
org.apache.zookeeper.server.ZooKeeperServer v;
int v, v, v;
java.lang.String v, v;
boolean v, v;
v := @parameter: java.io.File;
v := @parameter: org.apache.zookeeper.server.ServerCnxnFactory;
v := @parameter: java.lang.String;
v := @parameter: int;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: int getPort(java.lang.String)>(v);
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("STARTING server instance 127.0.0.1:{}", v);
v = new org.apache.zookeeper.server.ZooKeeperServer;
specialinvoke v.<org.apache.zookeeper.server.ZooKeeperServer: void <init>(java.io.File,java.io.File,int)>(v, v, 3000);
virtualinvoke v.<org.apache.zookeeper.server.ZooKeeperServer: void setCreateSessionTrackerServerId(int)>(v);
virtualinvoke v.<org.apache.zookeeper.server.ServerCnxnFactory: void startup(org.apache.zookeeper.server.ZooKeeperServer)>(v);
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("127.0.0.1:\u0001");
v = <org.apache.zookeeper.test.ClientBase: int CONNECTION_TIMEOUT>;
v = virtualinvoke v.<org.apache.zookeeper.server.ServerCnxnFactory: boolean isSecure()>();
v = staticinvoke <org.apache.zookeeper.test.ClientBase: boolean waitForServerUp(java.lang.String,long,boolean)>(v, v, v);
staticinvoke <org.junit.jupiter.api.Assertions: void assertTrue(boolean,java.lang.String)>(v, "waiting for server up");
return;
}
public static org.apache.zookeeper.server.ServerCnxnFactory createNewServerInstance(org.apache.zookeeper.server.ServerCnxnFactory, java.lang.String, int) throws java.io.IOException, java.lang.InterruptedException
{
org.slf4j.Logger v;
int v, v;
org.apache.zookeeper.server.ServerCnxnFactory v;
java.lang.String v;
java.lang.Integer v;
v := @parameter: org.apache.zookeeper.server.ServerCnxnFactory;
v := @parameter: java.lang.String;
v := @parameter: int;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: int getPort(java.lang.String)>(v);
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("CREATING server instance 127.0.0.1:{}", v);
if v != null goto label;
v = staticinvoke <org.apache.zookeeper.server.ServerCnxnFactory: org.apache.zookeeper.server.ServerCnxnFactory createFactory(int,int)>(v, v);
label:
return v;
}
static void shutdownServerInstance(org.apache.zookeeper.server.ServerCnxnFactory, java.lang.String)
{
org.slf4j.Logger v;
org.apache.zookeeper.server.ZKDatabase v;
java.io.IOException v;
org.apache.zookeeper.server.ServerCnxnFactory v;
org.apache.zookeeper.server.ZooKeeperServer v;
int v, v;
java.lang.String v, v;
boolean v, v;
v := @parameter: org.apache.zookeeper.server.ServerCnxnFactory;
v := @parameter: java.lang.String;
if v == null goto label;
v = null;
v = virtualinvoke v.<org.apache.zookeeper.server.ServerCnxnFactory: org.apache.zookeeper.server.ZooKeeperServer getZooKeeperServer()>();
if v == null goto label;
v = virtualinvoke v.<org.apache.zookeeper.server.ZooKeeperServer: org.apache.zookeeper.server.ZKDatabase getZKDatabase()>();
label:
virtualinvoke v.<org.apache.zookeeper.server.ServerCnxnFactory: void shutdown()>();
label:
if v == null goto label;
virtualinvoke v.<org.apache.zookeeper.server.ZKDatabase: void close()>();
label:
goto label;
label:
v := @caughtexception;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void warn(java.lang.String,java.lang.Throwable)>("Error closing logs ", v);
label:
v = staticinvoke <org.apache.zookeeper.test.ClientBase: int getPort(java.lang.String)>(v);
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("127.0.0.1:\u0001");
v = <org.apache.zookeeper.test.ClientBase: int CONNECTION_TIMEOUT>;
v = virtualinvoke v.<org.apache.zookeeper.server.ServerCnxnFactory: boolean isSecure()>();
v = staticinvoke <org.apache.zookeeper.test.ClientBase: boolean waitForServerDown(java.lang.String,long,boolean)>(v, v, v);
staticinvoke <org.junit.jupiter.api.Assertions: void assertTrue(boolean,java.lang.String)>(v, "waiting for server down");
label:
return;
catch java.io.IOException from label to label with label;
}
public static void setupTestEnv()
{
staticinvoke <java.lang.System: java.lang.String setProperty(java.lang.String,java.lang.String)>("zookeeper.preAllocSize", "100");
staticinvoke <org.apache.zookeeper.server.persistence.FilePadding: void setPreallocSize(long)>(102400L);
return;
}
protected void setUpAll() throws java.lang.Exception
{
java.util.LinkedList v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v = new java.util.LinkedList;
specialinvoke v.<java.util.LinkedList: void <init>()>();
v.<org.apache.zookeeper.test.ClientBase: java.util.List allClients> = v;
v.<org.apache.zookeeper.test.ClientBase: boolean allClientsSetup> = 1;
return;
}
public void setUp() throws java.lang.Exception
{
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
virtualinvoke v.<org.apache.zookeeper.test.ClientBase: void setUpWithServerId(int)>(1);
return;
}
protected void setUpWithServerId(int) throws java.lang.Exception
{
org.slf4j.Logger v, v;
long v, v;
org.apache.zookeeper.server.util.OSMXBean v;
java.io.File v, v;
java.lang.Long v;
int v;
org.apache.zookeeper.test.ClientBase v;
boolean v;
v := @this: org.apache.zookeeper.test.ClientBase;
v := @parameter: int;
v = new org.apache.zookeeper.server.util.OSMXBean;
specialinvoke v.<org.apache.zookeeper.server.util.OSMXBean: void <init>()>();
v = virtualinvoke v.<org.apache.zookeeper.server.util.OSMXBean: boolean getUnix()>();
if v == 0 goto label;
v = virtualinvoke v.<org.apache.zookeeper.server.util.OSMXBean: long getOpenFileDescriptorCount()>();
v.<org.apache.zookeeper.test.ClientBase: long initialFdCount> = v;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = v.<org.apache.zookeeper.test.ClientBase: long initialFdCount>;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("Initial fdcount is: {}", v);
label:
staticinvoke <org.apache.zookeeper.test.ClientBase: void setupTestEnv()>();
virtualinvoke v.<org.apache.zookeeper.test.ClientBase: void setupCustomizedEnv()>();
staticinvoke <org.apache.zookeeper.test.JMXEnv: void setUp()>();
virtualinvoke v.<org.apache.zookeeper.test.ClientBase: void setUpAll()>();
v = <org.apache.zookeeper.test.ClientBase: java.io.File testBaseDir>;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: java.io.File createTmpDir(java.io.File,boolean)>(v, 1);
v.<org.apache.zookeeper.test.ClientBase: java.io.File tmpDir> = v;
specialinvoke v.<org.apache.zookeeper.test.ClientBase: void startServer(int)>(v);
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>("Client test setup finished");
return;
}
protected void startServer() throws java.lang.Exception
{
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
specialinvoke v.<org.apache.zookeeper.test.ClientBase: void startServer(int)>(1);
return;
}
public void setupCustomizedEnv()
{
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
return;
}
private void startServer(int) throws java.lang.Exception
{
org.slf4j.Logger v;
java.util.Set v;
java.lang.String[] v;
org.apache.zookeeper.server.ServerCnxnFactory v, v, v;
java.io.File v;
int v, v;
java.lang.String v, v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v := @parameter: int;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>("STARTING server");
v = v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.server.ServerCnxnFactory serverFactory>;
v = v.<org.apache.zookeeper.test.ClientBase: java.lang.String hostPort>;
v = v.<org.apache.zookeeper.test.ClientBase: int maxCnxns>;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.server.ServerCnxnFactory createNewServerInstance(org.apache.zookeeper.server.ServerCnxnFactory,java.lang.String,int)>(v, v, v);
v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.server.ServerCnxnFactory serverFactory> = v;
v = v.<org.apache.zookeeper.test.ClientBase: java.io.File tmpDir>;
v = v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.server.ServerCnxnFactory serverFactory>;
v = v.<org.apache.zookeeper.test.ClientBase: java.lang.String hostPort>;
staticinvoke <org.apache.zookeeper.test.ClientBase: void startServerInstance(java.io.File,org.apache.zookeeper.server.ServerCnxnFactory,java.lang.String,int)>(v, v, v, v);
v = newarray (java.lang.String)[2];
v[0] = "InMemoryDataTree";
v[1] = "StandaloneServer_port";
v = staticinvoke <org.apache.zookeeper.test.JMXEnv: java.util.Set ensureParent(java.lang.String[])>(v);
specialinvoke v.<org.apache.zookeeper.test.ClientBase: void verifyUnexpectedBeans(java.util.Set)>(v);
return;
}
private void verifyUnexpectedBeans(java.util.Set)
{
long v, v;
java.lang.Long v;
int v;
java.lang.String v, v, v, v;
boolean v, v, v, v;
org.slf4j.Logger v, v;
java.util.Iterator v, v, v;
java.util.Set v;
java.util.List v, v;
java.lang.Object v, v, v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v := @parameter: java.util.Set;
v = v.<org.apache.zookeeper.test.ClientBase: java.util.List allClients>;
if v == null goto label;
v = v.<org.apache.zookeeper.test.ClientBase: java.util.List allClients>;
v = interfaceinvoke v.<java.util.List: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<javax.management.ObjectName: java.lang.String toString()>();
v = virtualinvoke v.<org.apache.zookeeper.ZooKeeper: long getSessionId()>();
v = staticinvoke <org.apache.zookeeper.test.ClientBase: java.lang.String getHexSessionId(long)>(v);
v = virtualinvoke v.<java.lang.String: boolean contains(java.lang.CharSequence)>(v);
if v == 0 goto label;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = virtualinvoke v.<org.apache.zookeeper.ZooKeeper: long getSessionId()>();
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v = virtualinvoke v.<javax.management.ObjectName: java.lang.String toString()>();
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object,java.lang.Object)>("found name:{} client bean:{}", v, v);
interfaceinvoke v.<java.util.Iterator: void remove()>();
goto label;
label:
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = virtualinvoke v.<javax.management.ObjectName: java.lang.String toString()>();
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("unexpected:{}", v);
goto label;
label:
v = interfaceinvoke v.<java.util.Set: int size()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int,java.lang.String)>(0, v, "Unexpected bean exists!");
return;
}
protected static java.lang.String getHexSessionId(long)
{
long v;
java.lang.String v, v;
v := @parameter: long;
v = staticinvoke <java.lang.Long: java.lang.String toHexString(long)>(v);
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("0x\u0001");
return v;
}
protected void stopServer() throws java.lang.Exception
{
org.slf4j.Logger v;
java.lang.String[] v;
org.apache.zookeeper.server.ServerCnxnFactory v;
java.lang.String v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>("STOPPING server");
v = v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.server.ServerCnxnFactory serverFactory>;
v = v.<org.apache.zookeeper.test.ClientBase: java.lang.String hostPort>;
staticinvoke <org.apache.zookeeper.test.ClientBase: void shutdownServerInstance(org.apache.zookeeper.server.ServerCnxnFactory,java.lang.String)>(v, v);
v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.server.ServerCnxnFactory serverFactory> = null;
v = newarray (java.lang.String)[0];
staticinvoke <org.apache.zookeeper.test.JMXEnv: java.util.Set ensureOnly(java.lang.String[])>(v);
return;
}
protected void tearDownAll() throws java.lang.Exception
{
java.lang.Throwable v;
org.slf4j.Logger v;
java.util.Iterator v;
java.util.List v, v;
java.lang.InterruptedException v;
java.lang.Object v;
org.apache.zookeeper.test.ClientBase v;
boolean v;
v := @this: org.apache.zookeeper.test.ClientBase;
entermonitor v;
label:
v = v.<org.apache.zookeeper.test.ClientBase: java.util.List allClients>;
if v == null goto label;
v = v.<org.apache.zookeeper.test.ClientBase: java.util.List allClients>;
v = interfaceinvoke v.<java.util.List: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
label:
if v == null goto label;
virtualinvoke v.<org.apache.zookeeper.ZooKeeper: void close()>();
label:
goto label;
label:
v := @caughtexception;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void warn(java.lang.String,java.lang.Throwable)>("ignoring interrupt", v);
goto label;
label:
v.<org.apache.zookeeper.test.ClientBase: java.util.List allClients> = null;
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
return;
catch java.lang.InterruptedException from label to label with label;
catch java.lang.Throwable from label to label with label;
}
public void tearDown() throws java.lang.Exception
{
long v, v, v;
byte v;
java.lang.String v, v, v;
boolean v, v;
org.slf4j.Logger v, v, v;
org.apache.zookeeper.server.util.OSMXBean v;
java.io.File v, v, v;
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>("tearDown starting");
virtualinvoke v.<org.apache.zookeeper.test.ClientBase: void tearDownAll()>();
virtualinvoke v.<org.apache.zookeeper.test.ClientBase: void stopServer()>();
v = v.<org.apache.zookeeper.test.ClientBase: java.io.File tmpDir>;
if v == null goto label;
v = v.<org.apache.zookeeper.test.ClientBase: java.io.File tmpDir>;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: boolean recursiveDelete(java.io.File)>(v);
v = v.<org.apache.zookeeper.test.ClientBase: java.io.File tmpDir>;
v = virtualinvoke v.<java.io.File: java.lang.String toString()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("delete \u0001");
staticinvoke <org.junit.jupiter.api.Assertions: void assertTrue(boolean,java.lang.String)>(v, v);
label:
v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.server.ServerCnxnFactory serverFactory> = null;
staticinvoke <org.apache.zookeeper.test.JMXEnv: void tearDown()>();
v = new org.apache.zookeeper.server.util.OSMXBean;
specialinvoke v.<org.apache.zookeeper.server.util.OSMXBean: void <init>()>();
v = virtualinvoke v.<org.apache.zookeeper.server.util.OSMXBean: boolean getUnix()>();
if v == 0 goto label;
v = virtualinvoke v.<org.apache.zookeeper.server.util.OSMXBean: long getOpenFileDescriptorCount()>();
v = v.<org.apache.zookeeper.test.ClientBase: long initialFdCount>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (long,long)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("fdcount after test is: \u at start it was \u0001");
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>(v);
v = v.<org.apache.zookeeper.test.ClientBase: long initialFdCount>;
v = v cmp v;
if v <= 0 goto label;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>("sleeping for 20 secs");
label:
virtualinvoke v.<org.apache.zookeeper.test.ClientBase: void cleanUpCustomizedEnv()>();
return;
}
public void cleanUpCustomizedEnv()
{
org.apache.zookeeper.test.ClientBase v;
v := @this: org.apache.zookeeper.test.ClientBase;
return;
}
public static javax.management.MBeanServerConnection jmxConn() throws java.io.IOException
{
javax.management.MBeanServerConnection v;
v = staticinvoke <org.apache.zookeeper.test.JMXEnv: javax.management.MBeanServerConnection conn()>();
return v;
}
public static boolean recursiveDelete(java.io.File)
{
java.io.File v;
boolean v;
v := @parameter: java.io.File;
v = staticinvoke <org.apache.zookeeper.test.TestUtils: boolean deleteFileRecursively(java.io.File,boolean)>(v, 1);
return v;
}
public static void logAllStackTraces()
{
java.util.Map v;
int v, v;
java.lang.StackTraceElement v;
java.lang.String v, v, v, v;
boolean v;
org.slf4j.Logger v;
java.util.Iterator v;
java.util.Set v;
java.lang.Object v, v, v;
java.lang.StringBuilder v;
v = new java.lang.StringBuilder;
specialinvoke v.<java.lang.StringBuilder: void <init>()>();
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>("Starting logAllStackTraces()\n");
v = staticinvoke <java.lang.Thread: java.util.Map getAllStackTraces()>();
v = interfaceinvoke v.<java.util.Map: java.util.Set entrySet()>();
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = interfaceinvoke v.<java.util.Map$Entry: java.lang.Object getKey()>();
v = virtualinvoke v.<java.lang.Thread: java.lang.String getName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Thread \u0001\n");
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>(v);
v = interfaceinvoke v.<java.util.Map$Entry: java.lang.Object getValue()>();
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.StackTraceElement)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\tat \u0001\n");
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>(v);
v = v + 1;
goto label;
label:
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>("Ending logAllStackTraces()\n");
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.String toString()>();
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String)>(v);
return;
}
void verifyRootOfAllServersMatch(java.lang.String) throws java.lang.InterruptedException, org.apache.zookeeper.KeeperException, java.io.IOException
{
java.lang.Integer v, v, v, v;
int[] v, v;
boolean v;
java.util.List v;
org.apache.zookeeper.test.ClientBase v;
java.lang.Throwable v, v;
java.lang.String[] v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
java.lang.String v, v, v;
org.slf4j.Logger v, v, v;
org.apache.zookeeper.TestableZooKeeper v;
v := @this: org.apache.zookeeper.test.ClientBase;
v := @parameter: java.lang.String;
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>(",");
v = lengthof v;
v = newarray (int)[v];
v = 0;
v = 0;
label:
if v >= 100 goto label;
v = lengthof v;
v = newarray (int)[v];
v = 0;
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
label:
v = virtualinvoke v.<org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.TestableZooKeeper createClient(java.lang.String)>(v);
label:
v = v;
v = v + 1;
v = virtualinvoke v.<org.apache.zookeeper.ZooKeeper: java.util.List getChildren(java.lang.String,boolean)>("/", 0);
v = interfaceinvoke v.<java.util.List: int size()>();
v[v] = v;
label:
virtualinvoke v.<org.apache.zookeeper.ZooKeeper: void close()>();
goto label;
label:
v := @caughtexception;
virtualinvoke v.<org.apache.zookeeper.ZooKeeper: void close()>();
throw v;
label:
v := @caughtexception;
v = v + 1;
staticinvoke <org.apache.zookeeper.test.ClientBase: void logAllStackTraces()>();
label:
v = v + 1;
goto label;
label:
v = staticinvoke <java.util.Arrays: boolean equals(int[],int[])>(v, v);
if v == 0 goto label;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = staticinvoke <java.util.Arrays: java.lang.String toString(int[])>(v);
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("Found match with array:{}", v);
v = v;
goto label;
label:
v = v;
staticinvoke <java.lang.Thread: void sleep(long)>(10000L);
if v > 10 goto label;
v = v + 1;
goto label;
label:
v = 1;
label:
v = lengthof v;
if v >= v goto label;
v = v - 1;
v = v[v];
v = v[v];
if v == v goto label;
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = v - 1;
v = v[v];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v = v[v];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String,java.lang.Object,java.lang.Object)>("node count not consistent{} {}", v, v);
goto label;
label:
v = <org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG>;
v = v - 1;
v = v[v];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v = v[v];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object,java.lang.Object)>("node count not consistent{} {}", v, v);
label:
v = v + 1;
goto label;
label:
return;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
public static org.apache.zookeeper.ZooKeeper createZKClient(java.lang.String) throws java.lang.Exception
{
int v;
org.apache.zookeeper.ZooKeeper v;
java.lang.String v;
v := @parameter: java.lang.String;
v = <org.apache.zookeeper.test.ClientBase: int CONNECTION_TIMEOUT>;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.ZooKeeper createZKClient(java.lang.String,int)>(v, v);
return v;
}
public static org.apache.zookeeper.ZooKeeper createZKClient(java.lang.String, int) throws java.io.IOException
{
org.apache.zookeeper.ZooKeeper v;
int v, v;
java.lang.String v;
v := @parameter: java.lang.String;
v := @parameter: int;
v = <org.apache.zookeeper.test.ClientBase: int CONNECTION_TIMEOUT>;
v = staticinvoke <org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.ZooKeeper createZKClient(java.lang.String,int,long)>(v, v, v);
return v;
}
public static org.apache.zookeeper.ZooKeeper createZKClient(java.lang.String, int, long) throws java.io.IOException
{
org.apache.zookeeper.ZooKeeper v;
int v;
long v;
java.lang.String v;
org.apache.zookeeper.client.ZKClientConfig v;
v := @parameter: java.lang.String;
v := @parameter: int;
v := @parameter: long;
v = new org.apache.zookeeper.client.ZKClientConfig;
specialinvoke v.<org.apache.zookeeper.client.ZKClientConfig: void <init>()>();
v = staticinvoke <org.apache.zookeeper.test.ClientBase: org.apache.zookeeper.ZooKeeper createZKClient(java.lang.String,int,long,org.apache.zookeeper.client.ZKClientConfig)>(v, v, v, v);
return v;
}
public static org.apache.zookeeper.ZooKeeper createZKClient(java.lang.String, int, long, org.apache.zookeeper.client.ZKClientConfig) throws java.io.IOException
{
org.apache.zookeeper.ZooKeeper v;
long v;
org.apache.zookeeper.test.ClientBase$CountdownWatcher v;
java.lang.Exception v;
int v;
java.lang.String v, v;
org.apache.zookeeper.client.ZKClientConfig v;
v := @parameter: java.lang.String;
v := @parameter: int;
v := @parameter: long;
v := @parameter: org.apache.zookeeper.client.ZKClientConfig;
v = new org.apache.zookeeper.test.ClientBase$CountdownWatcher;
specialinvoke v.<org.apache.zookeeper.test.ClientBase$CountdownWatcher: void <init>()>();
v = new org.apache.zookeeper.ZooKeeper;
specialinvoke v.<org.apache.zookeeper.ZooKeeper: void <init>(java.lang.String,int,org.apache.zookeeper.Watcher,org.apache.zookeeper.client.ZKClientConfig)>(v, v, v, v);
label:
virtualinvoke v.<org.apache.zookeeper.test.ClientBase$CountdownWatcher: void waitForConnected(long)>(v);
label:
goto label;
label:
v := @caughtexception;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("ZooKeeper client can not connect to \u0001");
staticinvoke <org.junit.jupiter.api.Assertions: java.lang.Object fail(java.lang.String)>(v);
label:
return v;
catch java.lang.InterruptedException from label to label with label;
catch java.util.concurrent.TimeoutException from label to label with label;
}
static void <clinit>()
{
org.slf4j.Logger v;
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(class "Lorg/apache/zookeeper/test/ClientBase;");
<org.apache.zookeeper.test.ClientBase: org.slf4j.Logger LOG> = v;
<org.apache.zookeeper.test.ClientBase: int CONNECTION_TIMEOUT> = 30000;
return;
}
}