Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-405

Allow custom server ports in the test suite (was: apache http library throws 'badurl' error while running Java SDK ant test against cluster on non-default port.)

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Critical
    • 2.0.0
    • None
    • None
    • Security Level: Public
    • None
    • CentOS 6.4 64-bit
      RAM:256GB
      Dual 2.9GHz 8-core Xeon E5-2690 for 32 total cores (16 + hyperthreading)

    Description

      This is part of multi-instance testing for customer 'A'.

      Steps to reproduce:
      1)Setup a 3 instances per physical machine. configure a cluster of 5 such instances. The instances are modified to run on non-default ports by modifying static config file. for example:

      {rest_port,9000}

      .

      {mccouch_port,9001}

      .

      {memcached_port,12000}

      .

      {memcached_dedicated_port,12001}

      .

      {moxi_port,12002}

      .

      {short_name,"ns11"}

      .

      {ssl_rest_port,11000}

      .

      {ssl_capi_port,11001}

      .

      {ssl_proxy_downstream_port,11002}

      .

      {ssl_proxy_upstream_port,11003}

      .

      2)clone java SDK project. change the server ip address and server port number(internal memcached port) in the build.xml file to reflect the server address and non-default internal memcached port (12001 in this case).
      example:sysproperty key="server.address_v6" value="${server.address_v6}"/>
      <sysproperty key="server.port_number" value="12001"/>

      3) the junit tests in the Java SDK contain hardcoded REST port, so modify all of them to non-default REST port:
      find . -name "*.java" -print0 | xargs -0 sed -i '' -e 's/8091/9000/g'

      4)Run 'ant test'. the ClusterManager tests fail with following apache http library error. the library methods are called from ClusterManager.java

      2014-01-23 16:35:03.786 WARN com.couchbase.client.ClusterManager: Cluster Response failed with:
      [junit] java.net.UnknownHostException: badurl
      [junit] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.validateAddress(DefaultConnectingIOReactor.java:245)
      [junit] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processSessionRequests(DefaultConnectingIOReactor.java:265)
      [junit] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:141)
      [junit] at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348)
      [junit] at com.couchbase.client.ClusterManager$2.run(ClusterManager.java:589)
      [junit] at java.lang.Thread.run(Thread.java:695)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            daschl Michael Nitschinger
            venu Venu Uppalapati (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty