Skip to content

Commit

Permalink
set DittoClientUsageExamples back to invoking all usage examples, not…
Browse files Browse the repository at this point in the history
… only the modifided loadtest

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Feb 5, 2021
1 parent 1ec4e01 commit bc7fe6b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 265 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public final class DittoClientUsageExamples {

private static final Logger LOGGER = LoggerFactory.getLogger(DittoClientUsageExamples.class);

// private static final String PROPERTIES_FILE = "ditto-client-starter-local.properties"; // for local development
private static final String PROPERTIES_FILE = "ditto-client-starter-aws-dev.properties";
private static final String PROPERTIES_FILE = "ditto-client-starter-local.properties"; // for local development
// private static final String PROPERTIES_FILE = "ditto-client-starter-sandbox.properties";
private static final String PROXY_HOST;
private static final String PROXY_PORT;
private static final String DITTO_ENDPOINT_URL;
Expand Down Expand Up @@ -151,32 +151,32 @@ public static void main(final String... args) throws ExecutionException, Interru
useTwinCommandsAndEvents(client, client2);
System.out.println("\n\nFinished with TWIN commands/events demo");
}
//
// if (shouldNotSkip("live.examples")) {
// client.live().startConsumption().get();
// client2.live().startConsumption().get();
//
// System.out.println("\n\nAbout to continue with LIVE commands/events demo:");
// promptEnterKey();
//
// useLiveCommands(client, client2);
// System.out.println("\n\nFinished with LIVE commands/events demo");
//
// System.out.println("\n\nAbout to continue with LIVE messages demo:");
// promptEnterKey();
//
// useLiveMessages(client, client2);
// System.out.println("\n\nFinished with LIVE messages demo");
// Thread.sleep(500);
// }
//
// if (shouldNotSkip("search.examples")) {
// System.out.println("\n\nAbout to continue with search commands:");
// promptEnterKey();
// useSearchCommands(client);
// System.out.println("\n\nFinished with SEARCH commands demo");
// Thread.sleep(500);
// }

if (shouldNotSkip("live.examples")) {
client.live().startConsumption().get();
client2.live().startConsumption().get();

System.out.println("\n\nAbout to continue with LIVE commands/events demo:");
promptEnterKey();

useLiveCommands(client, client2);
System.out.println("\n\nFinished with LIVE commands/events demo");

System.out.println("\n\nAbout to continue with LIVE messages demo:");
promptEnterKey();

useLiveMessages(client, client2);
System.out.println("\n\nFinished with LIVE messages demo");
Thread.sleep(500);
}

if (shouldNotSkip("search.examples")) {
System.out.println("\n\nAbout to continue with search commands:");
promptEnterKey();
useSearchCommands(client);
System.out.println("\n\nFinished with SEARCH commands demo");
Thread.sleep(500);
}

if (shouldNotSkip("load.test")) {
System.out.println("\n\nAbout to continue with small load test:");
Expand All @@ -186,21 +186,21 @@ public static void main(final String... args) throws ExecutionException, Interru
final int loadTestCount = 500;
subscribeForLoadTestUpdateChanges(client2, loadTestCount * loadTestThings, false);
performLoadTestUpdate(client, loadTestCount, loadTestThings, Duration.ofMillis(20), true);
// performLoadTestRead(client, loadTestCount, true);
performLoadTestRead(client, loadTestCount, true);
Thread.sleep(1000);
}

// if (shouldNotSkip("policies.examples")) {
// System.out.println("\n\nAbout to continue with policy example:");
// promptEnterKey();
// addNewSubjectToExistingPolicy(client);
// System.out.println("\n\nFinished with policy example");
// }

// client.destroy();
// client2.destroy();
// System.out.println("\n\nDittoClientUsageExamples successfully completed!");
// System.exit(0);
if (shouldNotSkip("policies.examples")) {
System.out.println("\n\nAbout to continue with policy example:");
promptEnterKey();
addNewSubjectToExistingPolicy(client);
System.out.println("\n\nFinished with policy example");
}

client.destroy();
client2.destroy();
System.out.println("\n\nDittoClientUsageExamples successfully completed!");
System.exit(0);
}

private static void addNewSubjectToExistingPolicy(final DittoClient client)
Expand Down
224 changes: 0 additions & 224 deletions java/src/test/java/org/eclipse/ditto/client/SearchPersistedTester.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ proxy.port=
#proxy.port=3128
ditto.truststore.location=
ditto.truststore.password=
ditto.endpoint=wss://ditto.eclipse.org
ditto.endpoint=wss://ditto.eclipseprojects.io
ditto.username=ditto
ditto.password=ditto
ditto.oauth.client-id=
Expand Down

0 comments on commit bc7fe6b

Please sign in to comment.