Issue Details (XML | Word | Printable)

Key: DIRMINA-159
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Niklas Therning
Reporter: Ersin Er
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MINA

Build of the project fails due to tests not passsing

Created: 04/Jan/06 11:10 PM   Updated: 31/Aug/06 10:32 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.9.1

Time Tracking:
Not Specified

Environment: Java. 1.5.0_06, Maven 2.0.1, Fedora Core 4

Resolution Date: 20/Jan/06 05:40 AM


 Description  « Hide
The build of the project sometimes fail with the following messages:

[surefire] Running org.apache.mina.transport.socket.nio.SocketTrafficControlTest
[surefire] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.164 sec <<<<<<<< FAILURE !!
[surefire] Running org.apache.mina.transport.socket.nio.DatagramTrafficControlTest
[surefire] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.146 sec <<<<<<<< FAILURE !!

However, this is not a certain case that happens all the time and when it happens, it blocks the build of the whole directory project in trunk which is really bad.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Ersin Er added a comment - 17/Jan/06 04:43 PM
This issue is closed but I still have the same problem *sometimes*. Here is the error output from my last full directory build:

[surefire] Running org.apache.mina.transport.socket.nio.DatagramTrafficControlTest
[surefire] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.254 sec <<<<<<<< FAILURE !!

Niklas Therning added a comment - 17/Jan/06 05:41 PM
Ok, I'll look at it some more. Could you post the test error report with the full stacktrace?

Ersin Er added a comment - 17/Jan/06 10:10 PM
Ok, it works now. The problem is that my hostname was defined neither in DNS nor local /etc/hosts. So when the name cannot be resolved the following error occurs:

...
java.net.UnknownHostException: ersin_er_mobile: ersin_er_mobile
at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
at org.apache.mina.transport.socket.nio.DatagramTrafficControlTest.connect(DatagramTrafficControlTest.java:50)
...

Niklas Therning added a comment - 17/Jan/06 10:34 PM
Could you try to change DatagramTrafficControlTest.java line 50 into

SocketAddress addr = new InetSocketAddress( "localhost", port );

and see if that takes care of the problem when your hostname isn't in /etc/hosts?

Ersin Er added a comment - 17/Jan/06 11:24 PM
This way the test passes but some new tests fail:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Using port 1025 for testing.
* Without localAddress
Using port 1025 for testing.
* Without localAddress
Using port 1025 for testing.
* Without localAddress
[surefire] Running org.apache.mina.examples.echoserver.ConnectorTest
[surefire] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.823 sec <<<<<<<< FAILURE !!
Using port 1025 for testing.
Using port 1025 for testing.
Using port 1025 for testing.
[surefire] Running org.apache.mina.examples.echoserver.AcceptorTest
[surefire] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.308 sec <<<<<<<< FAILURE !!

Results :
[surefire] Tests run: 6, Failures: 0, Errors: 6

[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------

I see that this is caused by same type of method call which is getLocalHost(). So the problem is certain I think.

Thanks.

Niklas Therning added a comment - 17/Jan/06 11:54 PM
Ok great! I'll have a look at these tests. It would be great if the tests would pass even if no network is available (except for the loopback interface of course).

Niklas Therning added a comment - 20/Jan/06 05:40 AM
I've now changed every occurence of InetAddress.getLocalHost() to use "localhost" or similar. I've also changed InetAddressEditorTest to only do lookups of external hosts if there is a network connection. MINA shoud now build without a network connection and without the current host's name resolving to an IP. I've verified this on my system.

I also had to downgrade easymockclassextension to 1.1 since 1.2 isn't in ibiblio and maven fails if it can't connect to ibiblio. Maven tried to download the easymockclassextension 1.2 pom on every build. If network is up it will only display a warning and the build succeeds but when network is down the build will always fail even if I have the JAR in my local repo.

Ersin, I really hope it works this time! :-)

Alex Karasulu added a comment - 20/Jan/06 05:54 AM
More problems but this time with deps for easymock on fresh checkout and fresh build. Here's what I get:

[INFO] ----------------------------------------------------------------------------
[INFO] Building mina-spring
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://cvs.apache.org/maven-snapshot-repository/easymock/easymockclassextension/1.1/easymockclassextension-1.1.pom
[WARNING] Unable to get resource from repository apache.snapshots (http://cvs.apache.org/maven-snapshot-repository)
Downloading: http://m2.safehaus.org/easymock/easymockclassextension/1.1/easymockclassextension-1.1.pom
474b downloaded
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for easymock/easymockclassextension/1.1/easymockclassextension-1.1.pom - IGNORING
Downloading: http://cvs.apache.org/maven-snapshot-repository/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom
[WARNING] Unable to get resource from repository apache.snapshots (http://cvs.apache.org/maven-snapshot-repository)
Downloading: http://m2.safehaus.org/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom
[WARNING] Unable to get resource from repository safehaus (http://m2.safehaus.org)
Downloading: http://repo1.maven.org/maven2/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: cglib:cglib-nodep

Reason: Error getting POM for 'cglib:cglib-nodep' from the repository: Error transferring file
  cglib:cglib-nodep:pom:2.1

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  safehaus (http://m2.safehaus.org),
  apache.snapshots (http://cvs.apache.org/maven-snapshot-repository)



[INFO] ----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 6 minutes 20 seconds
[INFO] Finished at: Thu Jan 19 15:37:27 EST 2006
[INFO] Final Memory: 8M/16M
[INFO] ----------------------------------------------------------------------------


Alex Karasulu added a comment - 20/Jan/06 05:55 AM
Very very odd when I try to build again it all works this time. I'm confused.

Emmanuel Lecharny added a comment - 20/Jan/06 06:11 AM
I have the same error as Alex, everytime I try to compile the project on my Ubuntu (Debian based) laptop.

It works without any problem on my FC3 desktop.

WeirdWeirdWeird, I say !

Niklas Therning added a comment - 20/Jan/06 06:18 AM
How utterly annoying! It works like a charm on *my* Ubuntu laptop! :-s I also got some warnings the first time I built after I changed the pom but it hasn't failed on me so far. What happens if you run maven with the -e switch?

Niklas Therning added a comment - 20/Jan/06 06:21 AM
BTW, I'm using Maven 2.0.1

Emmanuel Lecharny added a comment - 20/Jan/06 06:33 AM
Me too. And ubuntu 4.10. But I can't test it right now, because my laptop is at the office.

I didn't had any warning. The test just wail, like it can't bind.

Alex Karasulu added a comment - 20/Jan/06 06:47 AM
I'm on FC4 and cannot reproduce it anymore :(. I think it might have been a connectivity issue for me as I observed from this error message above:


Project ID: cglib:cglib-nodep

Reason: Error getting POM for 'cglib:cglib-nodep' from the repository: Error transferring file
  cglib:cglib-nodep:pom:2.1

Error transferring. The second build was able to download just fine though. I tried to reproduce it by deleting my repo but no luck.

Emmanuel Lecharny added a comment - 24/Jan/06 03:44 AM
It seems that this issue has a brother : DIRMINA-163.

However, I don't have anymore problem with the -Djava.net.preferIPv4Stack=true in mvn script. In eclipse, I must add it to the eclipse.sh script I created to launch eclipse.

But it seems that Mina should be tested with -Djava.net.preferIPv6Stack=true, and if it fails, be fixed.

Ersin Er added a comment - 31/Aug/06 10:32 AM
No longer valid.