Skip to content

Commit

Permalink
add tests for full coveraga + fix synchronization issue with refresh
Browse files Browse the repository at this point in the history
command
  • Loading branch information
abelsromero committed Aug 1, 2020
1 parent d90e637 commit 9a11bc1
Show file tree
Hide file tree
Showing 5 changed files with 266 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ protected void doWork() throws MojoFailureException, MojoExecutionException {
server.start();

super.doWork();
super.doWait();

server.stop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class AsciidoctorRefreshMojo extends AsciidoctorMojo {
public void execute() throws MojoExecutionException, MojoFailureException {
startPolling();
doWork();
doWait();
stopMonitors();
}

Expand All @@ -60,7 +61,6 @@ protected void doWork() throws MojoFailureException, MojoExecutionException {
}
});
getLog().info("Converted document(s) in " + timeInMillis + "ms");
doWait();
}

protected void doWait() throws MojoExecutionException, MojoFailureException {
Expand All @@ -71,7 +71,7 @@ protected void doWait() throws MojoExecutionException, MojoFailureException {
while ((line = scanner.nextLine()) != null) {
line = line.trim();
if ("exit".equalsIgnoreCase(line) || "quit".equalsIgnoreCase(line)) {
break;
return;
}

if ("refresh".equalsIgnoreCase(line)) {
Expand Down
Loading

0 comments on commit 9a11bc1

Please sign in to comment.