OpenSearch/distribution/tools/upgrade-cli
Andrew Ross 546ab21989
Use a non-default port for upgrade-cli unit tests (#1512)
I observed a [test failure][1] that I believe was caused by the fact
that an OpenSearch server happened to be running at localhost:9200 when
these unit tests were executed. The code under test has logic to try to
connect to localhost:9200 and then fall back to defaults if that port is
not open. The tests expect these defaults and will fail if different
data is returned. The change here is to use a non-default port to make
it very unlikely that a real instance will be running at the non-default
port. I don't know why an OpenSearch service happened to be running
during the linked test failure, but I think making these unit tests more
independent and isolated is helpful no matter the underlying cause in
this case.

[1]: https://fork-jenkins.searchservices.aws.dev/job/OpenSearch_CI/job/PR_Checks/job/Gradle_Check/975/artifact/gradle_check_975.log/*view*/

Signed-off-by: Andrew Ross <andrross@amazon.com>
2021-11-05 09:52:16 -04:00
..
licenses Update Jackson to 2.12.5 (#1247) 2021-09-21 18:33:20 -04:00
src Use a non-default port for upgrade-cli unit tests (#1512) 2021-11-05 09:52:16 -04:00
build.gradle A CLI tool to assist during an upgrade to OpenSearch. (#846) 2021-07-13 09:51:02 -07:00