Skip to content

Commit

Permalink
Fixed broken tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Apr 27, 2018
1 parent 2835724 commit 28ec8e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -7,7 +7,7 @@ notifications:
android:
components:
- tools
- build-tools-27.0.1
- build-tools-27.0.3
- android-27
- extra-android-support
- extra-android-m2repository
Expand Down
24 changes: 11 additions & 13 deletions core/src/test/java/eu/darken/rxshell/cmd/CmdProcessorTest.java
@@ -1,8 +1,5 @@
package eu.darken.rxshell.cmd;


import android.support.v4.util.Pair;

import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -15,6 +12,7 @@
import java.util.List;
import java.util.concurrent.TimeUnit;

import eu.darken.rxshell.extra.Pair;
import eu.darken.rxshell.process.RxProcess;
import eu.darken.rxshell.shell.RxShell;
import io.reactivex.observers.TestObserver;
Expand Down Expand Up @@ -107,7 +105,7 @@ public void testCommand_input_error() throws IOException {
}

@Test
public void testCommand_empty() throws IOException {
public void testCommand_empty() {
processor.attach(session);
Cmd cmd = Cmd.builder("").build();
final Cmd.Result result = processor.submit(cmd).test().awaitDone(2, TimeUnit.SECONDS).assertNoTimeout().assertValueCount(1).values().get(0);
Expand All @@ -118,7 +116,7 @@ public void testCommand_empty() throws IOException {
}

@Test
public void testCommand_multiple() throws IOException, InterruptedException {
public void testCommand_multiple() {
processor.attach(session);

int cnt = 100;
Expand All @@ -141,7 +139,7 @@ public void testCommand_multiple() throws IOException, InterruptedException {
}

@Test
public void testCommand_callback_sync() throws IOException, InterruptedException {
public void testCommand_callback_sync() {
processor.attach(session);

int cnt = 100;
Expand All @@ -164,7 +162,7 @@ public void testCommand_callback_sync() throws IOException, InterruptedException
}

@Test
public void testCommand_callback_async() throws IOException, InterruptedException {
public void testCommand_callback_async() {
processor.attach(session);

int cnt = 100;
Expand Down Expand Up @@ -224,7 +222,7 @@ public void testDeadShellClearsQueue() {
}

@Test
public void testCommand_disabledBuffers() throws IOException, InterruptedException {
public void testCommand_disabledBuffers() {
processor.attach(session);

Cmd.Result result = processor
Expand All @@ -239,7 +237,7 @@ public void testCommand_disabledBuffers() throws IOException, InterruptedExcepti
}

@Test
public void testWatchdog() throws IOException {
public void testWatchdog() {
processor.attach(session);

final Cmd.Result result = processor
Expand All @@ -252,7 +250,7 @@ public void testWatchdog() throws IOException {
}

@Test
public void testHarvestersUpstreamError_both() throws IOException {
public void testHarvestersUpstreamError_both() {
processor.attach(session);

new Thread(() -> {
Expand All @@ -270,7 +268,7 @@ public void testHarvestersUpstreamError_both() throws IOException {
}

@Test
public void testHarvestersUpstreamError_outpout() throws IOException {
public void testHarvestersUpstreamError_outpout() {
processor.attach(session);

new Thread(() -> {
Expand All @@ -285,7 +283,7 @@ public void testHarvestersUpstreamError_outpout() throws IOException {
}

@Test
public void testHarvestersUpstreamError_error() throws IOException {
public void testHarvestersUpstreamError_error() {
processor.attach(session);

new Thread(() -> {
Expand All @@ -300,7 +298,7 @@ public void testHarvestersUpstreamError_error() throws IOException {
}

@Test
public void testHarvestersPrematureCompletion() throws IOException {
public void testHarvestersPrematureCompletion() {
processor.attach(session);

new Thread(() -> {
Expand Down
@@ -1,14 +1,13 @@
package eu.darken.rxshell.cmd;

import android.support.v4.util.Pair;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;

import java.util.Collections;

import eu.darken.rxshell.extra.HasEnvironmentVariables;
import eu.darken.rxshell.extra.Pair;
import testtools.BaseTest;

import static org.hamcrest.MatcherAssert.assertThat;
Expand Down

0 comments on commit 28ec8e9

Please sign in to comment.