Author: ngn
Date: Wed Aug 27 06:17:55 2008
New Revision: 689474
URL: http://svn.apache.org/viewvc?rev=689474&view=rev
Log:
Moving TFTPServer to the unit tests
Adding a tests JAR to the output of the build
Added:
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/tftp/TFTPServer.java
(contents, props changed)
- copied, changed from r659010,
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java
Removed:
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java
Modified:
commons/proper/net/branches/NET_2_0/pom.xml
Modified: commons/proper/net/branches/NET_2_0/pom.xml
URL:
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/pom.xml?rev=689474&r1=689473&r2=689474&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/pom.xml (original)
+++ commons/proper/net/branches/NET_2_0/pom.xml Wed Aug 27 06:17:55 2008
@@ -158,6 +158,19 @@
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
Copied:
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/tftp/TFTPServer.java
(from r659010,
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java)
URL:
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/tftp/TFTPServer.java?p2=commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/tftp/TFTPServer.java&p1=commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java&r1=659010&r2=689474&rev=689474&view=diff
==============================================================================
---
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java
(original)
+++
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/tftp/TFTPServer.java
Wed Aug 27 06:17:55 2008
@@ -111,6 +111,7 @@
private int maxTimeoutRetries_ = 3;
private int socketTimeout_;
+ private Thread serverThread;
/**
@@ -241,9 +242,9 @@
serverTftp_.open(port_);
- Thread go = new Thread(this);
- go.setDaemon(true);
- go.start();
+ serverThread = new Thread(this);
+ serverThread.setDaemon(true);
+ serverThread.start();
}
@Override
@@ -332,6 +333,12 @@
{
// noop
}
+
+ try {
+ serverThread.join();
+ } catch (InterruptedException e) {
+ // we've done the best we could, return
+ }
}
/*
Propchange:
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/tftp/TFTPServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/tftp/TFTPServer.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL