diff --git a/buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/TestReportLogger.groovy b/buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/TestReportLogger.groovy index 450d3645182..6ed6ecf8619 100644 --- a/buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/TestReportLogger.groovy +++ b/buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/TestReportLogger.groovy @@ -28,12 +28,6 @@ import org.gradle.api.logging.LogLevel import org.gradle.api.logging.Logger import org.junit.runner.Description -import javax.sound.sampled.AudioSystem -import javax.sound.sampled.Clip -import javax.sound.sampled.Line -import javax.sound.sampled.LineEvent -import javax.sound.sampled.LineListener -import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicInteger import static com.carrotsearch.ant.tasks.junit4.FormattingUtils.formatDescription @@ -123,36 +117,9 @@ class TestReportLogger extends TestsSummaryEventListener implements AggregatedEv formatTime(e.getCurrentTime()) + ", stalled for " + formatDurationInSeconds(e.getNoEventDuration()) + " at: " + (e.getDescription() == null ? "" : formatDescription(e.getDescription()))) - try { - playBeat(); - } catch (Exception nosound) { /* handling exceptions with style */ } slowTestsFound = true } - void playBeat() throws Exception { - Clip clip = (Clip)AudioSystem.getLine(new Line.Info(Clip.class)); - final AtomicBoolean stop = new AtomicBoolean(); - clip.addLineListener(new LineListener() { - @Override - public void update(LineEvent event) { - if (event.getType() == LineEvent.Type.STOP) { - stop.set(true); - } - } - }); - InputStream stream = getClass().getResourceAsStream("/beat.wav"); - try { - clip.open(AudioSystem.getAudioInputStream(stream)); - clip.start(); - while (!stop.get()) { - Thread.sleep(20); - } - clip.close(); - } finally { - stream.close(); - } - } - @Subscribe void onQuit(AggregatedQuitEvent e) throws IOException { if (config.showNumFailuresAtEnd > 0 && !failedTests.isEmpty()) { diff --git a/buildSrc/src/main/resources/beat.wav b/buildSrc/src/main/resources/beat.wav deleted file mode 100644 index 4083a4ce618..00000000000 Binary files a/buildSrc/src/main/resources/beat.wav and /dev/null differ