bshashikant commented on a change in pull request #107:
URL: https://github.com/apache/incubator-ratis/pull/107#discussion_r433734477
##########
File path:
ratis-logservice/src/test/java/org/apache/ratis/logservice/server/TestMetaServer.java
##########
@@ -61,36 +63,52 @@
static AtomicInteger createCount = new AtomicInteger();
static AtomicInteger deleteCount = new AtomicInteger();
static AtomicInteger listCount = new AtomicInteger();
- LogServiceClient client = new LogServiceClient(cluster.getMetaIdentity()){
- @Override public LogStream createLog(LogName logName) throws
IOException {
+ static LogServiceClient client = null;
+
+ @BeforeClass
+ public static void beforeClass() {
+ cluster = new LogServiceCluster(3);
+ cluster.createWorkers(3);
+ workers = cluster.getWorkers();
+ assert(workers.size() == 3);
+
+ RaftProperties properties = new RaftProperties();
+ RaftClientConfigKeys.Rpc.setRequestTimeout(properties,
TimeDuration.valueOf(15, TimeUnit.SECONDS));
+
+
+ cluster.getMasters().parallelStream().forEach(master ->
+
((MetaStateMachine)master.getMetaStateMachine()).setProperties(properties));
+
+ client = new LogServiceClient(cluster.getMetaIdentity(), properties) {
+ @Override public LogStream createLog(LogName logName) throws
IOException {
Review comment:
Can you plz fix the formatting here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]