Skip to content

Commit

Permalink
allow setup methods to throw exceptions back to junit
Browse files Browse the repository at this point in the history
  • Loading branch information
ceharris committed Sep 29, 2015
1 parent 3e57838 commit 9832708
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public class NonPersistentTCPNetSyslog4jTest extends AbstractNetSyslog4jTest {
public static String instanceName = "tcp-non-persistent";

public void setUp() {
public void setUp() throws Exception {
TCPNetSyslogConfig config = new TCPNetSyslogConfig();
config.setPersistentConnection(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void sessionClosed(Object session, SyslogServerIF syslogServer, SocketAdd
}
}

public void setUp() {
public void setUp() throws Exception {
if (ONCE) {
ONCE = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public class UDPNetSyslog4jTest extends AbstractNetSyslog4jTest {
protected static boolean ONCE = true;

public void setUp() {
public void setUp() throws Exception {
if (ONCE) {
ONCE = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void destroy(SyslogServerIF syslogServer) {
protected SyslogServerIF server = null;

protected abstract String getClientProtocol();
protected abstract String getServerProtocol();
protected abstract String getServerProtocol() throws Exception;

protected abstract int getMessageCount();

Expand Down Expand Up @@ -165,7 +165,7 @@ protected void startServerThread(String protocol) {
}
}

public void setUp() {
public void setUp() throws Exception {
String protocol = getServerProtocol();

startServerThread(protocol);
Expand Down

0 comments on commit 9832708

Please sign in to comment.