[ 
https://issues.apache.org/jira/browse/CURATOR-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14034424#comment-14034424
 ] 

ASF GitHub Bot commented on CURATOR-114:
----------------------------------------

Github user cammckenzie commented on a diff in the pull request:

    https://github.com/apache/curator/pull/11#discussion_r13887642
  
    --- Diff: 
curator-test/src/main/java/org/apache/curator/test/TestingServer.java ---
    @@ -104,6 +171,17 @@ public void stop() throws IOException
         }
     
         /**
    +     * Restart the server. This is only valid if the server has previously 
been
    --- End diff --
    
    I agree, I was surprised that restart was really just 'start if you've been 
stopped before'. It doesn't look like any test cases are using this code at the 
moment, so I'll modify the restart() to do a stop() if it's running, followed 
by a start().


> TestingServer should expose restart() method.
> ---------------------------------------------
>
>                 Key: CURATOR-114
>                 URL: https://issues.apache.org/jira/browse/CURATOR-114
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 2.5.0
>            Reporter: Cameron McKenzie
>            Priority: Trivial
>
> Currently restarting the TestingServer involves:
> server.stop()
> server = new TestingServer(server.getPort(), server.getTempDirectory());
> The underlying Zookeeper testing server that is contained within 
> TestingServer supports a restart() method. It would be cleaner to expose this 
> on the TestingServer interface, so a restart would simply involve:
> server.restart()



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to