Skip to content

Commit 788d575

Browse files
author
Simon MacMullen
committed
Merge bug26129
2 parents 0e1806f + d72fa26 commit 788d575

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/src/com/rabbitmq/examples/perf/ScenarioFactory.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@
77

88
public class ScenarioFactory {
99
public static Scenario fromJSON(Map json, ConnectionFactory factory) {
10+
String uri = "amqp://localhost";
1011
String type = read("type", json, String.class);
1112
String name = read("name", json, String.class);
1213
Integer interval = read("interval", json, Integer.class, 1000);
1314
List paramsJSON = read("params", json, List.class);
1415

16+
try {
17+
uri = read("uri", json, String.class);
18+
factory.setUri(uri);
19+
} catch(Exception e) {
20+
throw new RuntimeException("scenario: " + name + " with malformed uri: "
21+
+ uri + " - " + e.getMessage());
22+
}
23+
1524
MulticastParams[] params = new MulticastParams[paramsJSON.size()];
1625
for (int i = 0; i < paramsJSON.size(); i++) {
1726
params[i] = paramsFromJSON((Map) paramsJSON.get(i));

0 commit comments

Comments
 (0)