Skip to content

Commit c7e1b59

Browse files
committed
FFM-1928 - Example extended.
1 parent 77ec086 commit c7e1b59

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/main/java/io/harness/cf/client/example/Example.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@ public static void main(String... args) {
3939

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

42-
final String random = getRandom();
43-
44-
final Target target =
45-
Target.builder()
46-
.identifier("Target_" + random)
47-
.isPrivate(false)
48-
.attribute("Test_key_" + getRandom(), getRandom())
49-
.attribute("Test_key_" + getRandom(), getRandom())
50-
.attribute("Test_key_" + getRandom(), getRandom())
51-
.name("Target_" + random)
52-
.build();
53-
5442
for (final String keyName : keys.keySet()) {
5543

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

49+
final String random = getRandom();
50+
51+
final Target target =
52+
Target.builder()
53+
.identifier("Target_" + random)
54+
.isPrivate(false)
55+
.attribute("Test_key_" + getRandom(), getRandom())
56+
.attribute("Test_key_" + getRandom(), getRandom())
57+
.attribute("Test_key_" + getRandom(), getRandom())
58+
.name("Target_" + random)
59+
.build();
60+
6161
scheduler.scheduleAtFixedRate(
6262
() -> {
6363
final boolean bResult = client.boolVariation("flag1", target, false);

0 commit comments

Comments
 (0)