hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-5386) To Probe free ports dynamically for Unit test to replace fixed ports
Date Wed, 04 Mar 2009 07:43:56 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-5386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678624#action_12678624

Chris Douglas commented on HADOOP-5386:

* As part of this patch, would it be possible to cut the test timeout from 3 minutes to 30
seconds at most?
* Ideally, the proxy would start up on a random port instead of writing the config from ant,
but OK. Since FindFreePort is used only in the unit tests, it should probably:
** Move under hdfsproxy/test/...
** Write the whole config file instead of using sed in a later ant task
** Pick a random port instead of starting at a fixed port and rolling to find an open one
* {{ant -Dtestcase=TestHdfsProxy test}} fails reliably on my machine:
     [echo]  Free Ports: startup-54321 / http-54322 / https-54323
     [echo] Please take a deep breath while Cargo gets the Tomcat for running the servlet
   [cactus] -----------------------------------------------------------------
   [cactus] Running tests against Tomcat 5.x @ http://localhost:54322
   [cactus] -----------------------------------------------------------------
   [cactus] Deploying [/snip/hadoop/build/contrib/hdfsproxy/target/test.war] to \
   [cactus] Tomcat 5.x starting...
Server [Apache-Coyote/1.1] started
   [cactus] Running org.apache.hadoop.hdfsproxy.TestHdfsProxy
   [cactus] Tomcat 5.x started on port [54322]
   [cactus] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 14.53 sec
   [cactus] Test org.apache.hadoop.hdfsproxy.TestHdfsProxy FAILED
   [cactus] Tomcat 5.x is stopping...
   [cactus] Tomcat 5.x is stopped
[junitreport] Processing /snip/hadoop/build/contrib/hdfsproxy/target/reports/TESTS-TestSuites.xml
                      to /tmp/null1419962142
[junitreport] Loading stylesheet jar:file:/tools/apache-ant-1.7.1/lib/ant-junit.jar!\
[junitreport] Transform time: 408ms
[junitreport] Deleting: /tmp/null1419962142

/snip/hadoop/build.xml:773: The following error occurred while executing this line:
/snip/hadoop/src/contrib/build.xml:48: The following error occurred while executing this line:
/snip/hadoop/src/contrib/hdfsproxy/build.xml:237: Tests failed!

Total time: 41 seconds
* Note that hdfsproxy isn't the last project in test, but the failure stops the build. That
should be fixed, either as part of this issue or in another one.
* When {{ant -Dtestcase=FOO test}} is run, this still starts tomcat.

> To Probe free ports dynamically for Unit test to replace fixed ports
> --------------------------------------------------------------------
>                 Key: HADOOP-5386
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5386
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: contrib/hdfsproxy
>    Affects Versions: 0.21.0
>            Reporter: zhiyong zhang
>            Assignee: zhiyong zhang
>             Fix For: 0.21.0
>         Attachments: HADOOP-5386.patch
> Currently hdfsproxy unit test uses Cactus in-container test. It uses three fixed ports.
one for tomcat start-up/shut-down, another for tomcat http-port and the third for tomcat https-port.

> If theses ports are already in use, ant build will fail. To fix this, we decided to use
a java program to probe the free ports dynamically and update the tomcat conf with these free

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message