Assert.hasText(host, "host must not be empty nor null");
Assert.hasText(privateKey, "privateKey must not be empty nor null");
long timeout = System.currentTimeMillis() + waitTime;
while (!isDirectoryCreated && System.currentTimeMillis() < timeout) {
SshjSshClient client = getSSHClient(host, privateKey);
client.exec("mkdir " + path);
ExecResponse response = client.exec("ls -al " + path);
if (response.getExitStatus() > 0) {
continue; //directory was not created
}
isDirectoryCreated = true;