Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.

Commit

Permalink
Improve test stability
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Feb 18, 2016
1 parent af07f39 commit 1608d33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/java/biz/paluch/spinach/ClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void connectConnectionRefused() throws Exception {
client.connect();
} catch (Exception e) {
assertThat(e).hasRootCauseExactlyInstanceOf(ConnectException.class);
assertThat(e.getCause().getCause()).hasMessageContaining("Connection refused");
assertThat(e.getCause().getCause()).hasMessageContaining(TestSettings.host());
}
client.shutdown(0, 0, TimeUnit.MILLISECONDS);
}
Expand Down
9 changes: 8 additions & 1 deletion src/test/java/biz/paluch/spinach/impl/DisqueCommandTest.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package biz.paluch.spinach.impl;

import static org.assertj.core.api.Assertions.*;
import static org.assertj.core.api.Assertions.assertThat;

import java.nio.ByteBuffer;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import org.junit.After;
import org.junit.Test;

import biz.paluch.spinach.api.CommandKeyword;
Expand All @@ -23,6 +24,12 @@ public class DisqueCommandTest {
private DisqueCommand<String, String, String> sut = new DisqueCommand<String, String, String>(CommandKeyword.GET,
new StatusOutput<String, String>(null), new DisqueCommandArgs<String, String>(null));

@After
public void tearDown() throws Exception {
// clear interrupted flag
Thread.interrupted();
}

@Test
public void sucessfulGet() throws Exception {

Expand Down

0 comments on commit 1608d33

Please sign in to comment.