This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 173048 - Fix nativeexecution tests
Summary: Fix nativeexecution tests
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Alexey Vladykin
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2009-09-24 17:03 UTC by Andrew Krasny
Modified: 2010-04-19 08:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Krasny 2009-09-24 17:03:25 UTC
Some tests are failing - need to fix them
Comment 1 Quality Engineering 2009-09-27 22:40:03 UTC
Integrated into 'main-golden', will be available in build *200909270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5fe33b4aff13
User: Andrew Krasny <akrasny@netbeans.org>
Log: IZ#173048 - Fix nativeexecution tests - fix of LocalNativeProcessTest on Windows
Comment 2 Quality Engineering 2009-10-16 22:02:52 UTC
Integrated into 'main-golden', will be available in build *200910161401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0acfd82cb63d
User: Andrew Krasny <akrasny@netbeans.org>
Log: IZ#173048 - Fix nativeexecution tests (partfix)
Comment 3 Alexey Vladykin 2010-04-16 13:23:35 UTC
Many test failures are caused by connection error:

FINE: New connection established: dev-tester1@cska:22 - Linux-SuSE
FINEST: JSCH: Caught an exception, leaving main loop due to SSH_MSG_DISCONNECT: 2 Received ieof for nonexistent channel 0. 
FINEST: JSCH: Disconnecting from cska port 22
Apr 16, 2010 3:24:12 PM org.netbeans.modules.nativeexecution.support.hostinfo.FetchHostInfoTask compute
INFO: Exception while receiving hostinfo for dev-tester1@cska:22
java.io.IOException: Exception while receiving HostInfo for dev-tester1@cska:22: com.jcraft.jsch.JSchException: session is down
	at org.netbeans.modules.nativeexecution.support.hostinfo.impl.UnixHostInfoProvider.getRemoteHostInfo(UnixHostInfoProvider.java:178)
	at org.netbeans.modules.nativeexecution.support.hostinfo.impl.UnixHostInfoProvider.getHostInfo(UnixHostInfoProvider.java:91)
	at org.netbeans.modules.nativeexecution.support.hostinfo.FetchHostInfoTask.compute(FetchHostInfoTask.java:60)
	at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:202)
	at org.netbeans.modules.nativeexecution.api.NativeProcessBuilderTest.testSetExecutable(NativeProcessBuilderTest.java:260)
	at org.netbeans.modules.nativeexecution.api.NativeProcessBuilderTest.testSetExecutable(NativeProcessBuilderTest.java:127)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:89)
	at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:345)
	at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:274)
	at java.lang.Thread.run(Thread.java:619)

According to http://www.mail-archive.com/jsch-users@lists.sourceforge.net/msg00673.html this is a race condition in JSch, which should be fixed in the next release. Current release 0.1.42 does not include the fix.
Comment 4 Alexey Vladykin 2010-04-16 13:57:10 UTC
Refactoring and cleanup of NativeProcessBuilderTest: http://hg.netbeans.org/cnd-main/rev/24f2b393157c
Comment 5 Alexey Vladykin 2010-04-16 15:24:34 UTC
Fixing ProcBasedProcessInfoProviderTest: http://hg.netbeans.org/cnd-main/rev/3942cbefe82e
Comment 6 Alexey Vladykin 2010-04-19 08:45:15 UTC
Fixed WindowsSupportTest.testConvertToCygwinPath: http://hg.netbeans.org/cnd-main/rev/1a2d26261cdc

All other nativeexecution tests are failing due to random SSH connection failures presumably caused by JSch bug described in comment #3. I'm closing this bug as fixed and opening a new one for that problem.
Comment 7 Alexey Vladykin 2010-04-19 08:51:51 UTC
Filed bug #184421 - random connection failures in jsch.