Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-959

Remove hardcoded port numbers from TestReplicationHandler

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.4
    • replication (java)
    • None

    Description

      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.

      Attachments

        1. replicationtest-port-refactor.patch
          6 kB
          Chris M. Hostetter
        2. SOLR-959.patch
          12 kB
          Akshay K. Ukey

        Activity

          People

            shalin Shalin Shekhar Mangar
            hossman Chris M. Hostetter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: