Skip to content
Snippets Groups Projects
Commit 5d3f967d authored by Petr Bainar's avatar Petr Bainar
Browse files

migration-dd-18-42: update tests

parent 29874857
No related branches found
No related tags found
1 merge request!37Migration dd 18 42
package cz.it4i.fiji.haas_java_client; package cz.it4i.fiji.haas_java_client;
import java.io.IOException; import java.io.IOException;
...@@ -11,8 +12,8 @@ public class TestCommunicationWithNodes { ...@@ -11,8 +12,8 @@ public class TestCommunicationWithNodes {
public static Logger log = LoggerFactory.getLogger(cz.it4i.fiji.haas_java_client.TestCommunicationWithNodes.class); public static Logger log = LoggerFactory.getLogger(cz.it4i.fiji.haas_java_client.TestCommunicationWithNodes.class);
private static String[] predefined = new String[2]; private static String[] predefined = new String[2];
@SuppressWarnings("resource") @SuppressWarnings("resource")
public static void main(String[] args) throws IOException, InterruptedException { public static void main(String[] args) throws IOException, InterruptedException {
predefined[0] = "POST /modules/'command:net.imagej.ops.math.PrimitiveMath$IntegerAdd'?process=false HTTP/1.1\r\n" + predefined[0] = "POST /modules/'command:net.imagej.ops.math.PrimitiveMath$IntegerAdd'?process=false HTTP/1.1\r\n" +
...@@ -28,9 +29,9 @@ public class TestCommunicationWithNodes { ...@@ -28,9 +29,9 @@ public class TestCommunicationWithNodes {
"User-Agent: curl/7.47.0\r\n" + // "User-Agent: curl/7.47.0\r\n" + //
"Accept: */*\r\n" + // "Accept: */*\r\n" + //
"\r\n"; "\r\n";
HaaSClientSettings settings = SettingsProvider.getSettings("OPEN-12-20", HaaSClientSettings settings = SettingsProvider.getSettings("DD-18-42",
TestingConstants.CONFIGURATION_FILE_NAME); TestingConstants.CONFIGURATION_FILE_NAME);
HaaSClient client = new HaaSClient(settings); HaaSClient client = new HaaSClient(settings);
long id = startBDS(client); long id = startBDS(client);
String sessionID = client.getSessionID(); String sessionID = client.getSessionID();
......
package cz.it4i.fiji.haas_java_client; package cz.it4i.fiji.haas_java_client;
import java.io.IOException; import java.io.IOException;
...@@ -12,14 +13,18 @@ public class TestConcurentAccessToHaaSFileTransfer { ...@@ -12,14 +13,18 @@ public class TestConcurentAccessToHaaSFileTransfer {
@SuppressWarnings("resource") @SuppressWarnings("resource")
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
HaaSClient client = new HaaSClient(SettingsProvider.getSettings("OPEN-12-20",TestingConstants.CONFIGURATION_FILE_NAME)); HaaSClient client = new HaaSClient(SettingsProvider.getSettings("DD-18-42",
HaaSFileTransfer tr1 = client.startFileTransfer(250, HaaSClient.DUMMY_TRANSFER_FILE_PROGRESS); TestingConstants.CONFIGURATION_FILE_NAME));
HaaSFileTransfer tr2 = client.startFileTransfer(249, HaaSClient.DUMMY_TRANSFER_FILE_PROGRESS); HaaSFileTransfer tr1 = client.startFileTransfer(250,
log.info("config.yaml - size:" + tr1.obtainSize(Arrays.asList("config.yaml"))); HaaSClient.DUMMY_TRANSFER_FILE_PROGRESS);
HaaSFileTransfer tr2 = client.startFileTransfer(249,
HaaSClient.DUMMY_TRANSFER_FILE_PROGRESS);
log.info("config.yaml - size:" + tr1.obtainSize(Arrays.asList(
"config.yaml")));
tr1.close(); tr1.close();
log.info("config.yaml - size:" + tr2.obtainSize(Arrays.asList("config.yaml"))); log.info("config.yaml - size:" + tr2.obtainSize(Arrays.asList(
"config.yaml")));
tr2.close(); tr2.close();
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment