You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/12/04 09:29:57 UTC
[GitHub] [zookeeper] eolivelli commented on a change in pull request #1116:
ZOOKEEPER-3575: Moving sending packets in Learner to a separate thread
eolivelli commented on a change in pull request #1116: ZOOKEEPER-3575: Moving sending packets in Learner to a separate thread
URL: https://github.com/apache/zookeeper/pull/1116#discussion_r353629573
##########
File path: zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigDuringLeaderSyncTest.java
##########
@@ -40,18 +42,33 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@RunWith(Parameterized.class)
public class ReconfigDuringLeaderSyncTest extends QuorumPeerTestBase {
protected static final Logger LOG = LoggerFactory.getLogger(ReconfigDuringLeaderSyncTest.class);
private static int SERVER_COUNT = 3;
private MainThread[] mt;
+ private boolean asyncSending;
+
+ public ReconfigDuringLeaderSyncTest(boolean asyncSending) {
+ this.asyncSending = asyncSending;
+ }
+
+ @Parameterized.Parameters
+ public static Collection sendingModes() {
+ return Arrays.asList(new Object[][]{{true}, {false}});
+ }
+
@Before
public void setup() {
System.setProperty("zookeeper.DigestAuthenticationProvider.superDigest", "super:D/InIHSb7yEEbrWz8b9l71RjZJU="/* password is 'test'*/);
+ Learner.setAsyncSending(asyncSending);
Review comment:
please reset the value in a @before method
it is a static flag, so it will affect other tests
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services