[improve] [broker] Verify at least one URL is present for cluster creation#20821
[improve] [broker] Verify at least one URL is present for cluster creation#20821harshithasudhakar wants to merge 15 commits intoapache:masterfrom
Conversation
Checking if `serviceUrl`, `serviceUrlTls`, `brokerServiceUrl`, or `brokerServiceUrlTls` are not null. Then proceeds to throw `IllegalArgumentException` if either of `serviceUrl`, `serviceUrlTls` or `brokerServiceUrl`, `brokerServiceUrlTls` has not been set.
|
@harshithasudhakar Please add the following content to your PR description and select a checkbox: |
Technoboy-
left a comment
There was a problem hiding this comment.
Could we use StringUtils.isEmpty(getServiceUrl()) && StringUtils.isEmpty(getServiceUrlTls()) to reduce the codes ?
poorbarcode
left a comment
There was a problem hiding this comment.
Could you add a test for this change?
Used StringUtils.isEmpty(getServiceUrl()) && StringUtils.isEmpty(getServiceUrlTls()) to reduce the codes
|
@poorbarcode I have made two testcases to make sure at least one URL is set. |
Changes: 1. testUpdateClusterServiceUrl(): Tests API for updating cluster's Service URL, and checks if the retrieved serviceURL matches with it. 2. testUpdateClusterBrokerServiceUrl(): Tests API for updating cluster's Service Broker URL, and checks if the retrieved serviceBrokerURL matches with it.
|
@poorbarcode @Technoboy-
|
|
@poorbarcode @Technoboy- Hi, are there any other similar issues I can work on? |
|
The pr had no activity for 30 days, mark with Stale label. |
|
Hi, I'd like to fix the errors in this PR but I'm unable to find the log files for this. Can you help me out? How can I run the tests again? |
Fixes #5638
Main/Original Issue: apache#19866
Motivation
Modifications
Checking if
serviceUrl,serviceUrlTls,brokerServiceUrl, orbrokerServiceUrlTlsare not null. Then proceeds to throwIllegalArgumentExceptionif either ofserviceUrl,serviceUrlTlsorbrokerServiceUrl,brokerServiceUrlTlshas not been set.Verifying this change
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-complete