You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Akshay K. Ukey (JIRA)" <ji...@apache.org> on 2009/02/06 18:39:59 UTC

[jira] Updated: (SOLR-959) Remove hardcoded port numbers from TestReplicationHandler

     [ https://issues.apache.org/jira/browse/SOLR-959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Akshay K. Ukey updated SOLR-959:
--------------------------------

    Attachment: SOLR-959.patch

Patch with re-factoring from previous patch and few more changes.

> Remove hardcoded port numbers from TestReplicationHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-959
>                 URL: https://issues.apache.org/jira/browse/SOLR-959
>             Project: Solr
>          Issue Type: Test
>          Components: replication (java)
>            Reporter: Hoss Man
>            Priority: Minor
>         Attachments: replicationtest-port-refactor.patch, SOLR-959.patch
>
>
> TestReplicationHandler has a hardcoded port of 9999 in it for the "master".  hardcoding port numbers in unit tests is very brittle and error prone and can cause problems.  Ideally tests that aren't explicitly testing network related functionality should avoid dealing with the network at all, but when neccessary it's much better to let the OS pick any available port (as most other solr tests do) then to hardcoded it.
> in TestReplicationHandler things are a little more complicated because the master port number needs to be refered to in the slave config files.

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