Skip to content

Commit

Permalink
FFM-1928 - Example extended.
Browse files Browse the repository at this point in the history
  • Loading branch information
milos85vasic committed Dec 15, 2021
1 parent 77ec086 commit c7e1b59
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/main/java/io/harness/cf/client/example/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@ public static void main(String... args) {

Runtime.getRuntime().addShutdownHook(new Thread(scheduler::shutdown));

final String random = getRandom();

final Target target =
Target.builder()
.identifier("Target_" + random)
.isPrivate(false)
.attribute("Test_key_" + getRandom(), getRandom())
.attribute("Test_key_" + getRandom(), getRandom())
.attribute("Test_key_" + getRandom(), getRandom())
.name("Target_" + random)
.build();

for (final String keyName : keys.keySet()) {

final String apiKey = keys.get(keyName);
final FileMapStore fileStore = new FileMapStore(keyName);
final CfClient client = new CfClient(apiKey, Config.builder().store(fileStore).build());
final String logPrefix = keyName + " :: " + client.hashCode() + " ";

final String random = getRandom();

final Target target =
Target.builder()
.identifier("Target_" + random)
.isPrivate(false)
.attribute("Test_key_" + getRandom(), getRandom())
.attribute("Test_key_" + getRandom(), getRandom())
.attribute("Test_key_" + getRandom(), getRandom())
.name("Target_" + random)
.build();

scheduler.scheduleAtFixedRate(
() -> {
final boolean bResult = client.boolVariation("flag1", target, false);
Expand Down

0 comments on commit c7e1b59

Please sign in to comment.