You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/06/18 13:21:25 UTC
svn commit: r955941 -
/directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
Author: elecharny
Date: Fri Jun 18 11:21:24 2010
New Revision: 955941
URL: http://svn.apache.org/viewvc?rev=955941&view=rev
Log:
Removed @Ignore tags for the NTP test (I don't know why it was back again ...)
Modified:
directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
Modified: directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java?rev=955941&r1=955940&r2=955941&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java (original)
+++ directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java Fri Jun 18 11:21:24 2010
@@ -33,7 +33,6 @@ import org.apache.mina.filter.executor.E
import org.apache.mina.util.AvailablePortFinder;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
@@ -74,7 +73,6 @@ public class NtpITest
* @throws Exception if there are errors
*/
@Test
- @Ignore
public void testNtp() throws Exception
{
InetAddress host = InetAddress.getByName( null );
@@ -85,7 +83,7 @@ public class NtpITest
long currentTime = System.currentTimeMillis();
TimeInfo timeInfo = ntp.getTime( host, port );
long returnTime = timeInfo.getReturnTime();
- assertTrue( currentTime - returnTime < 1000 );
+ assertTrue( Math.abs( currentTime - returnTime ) < 1000 );
timeInfo.computeDetails();