Skip to content

Commit

Permalink
Changes to make the FQDN checks dependent on node count
Browse files Browse the repository at this point in the history
Signed-off-by: sandhi <sagarwal@progress.com>
  • Loading branch information
sandhi18 committed Jul 11, 2023
1 parent fbcc0fb commit 83a4d91
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ func makeSet(reqNodes []string, isAfterDeployment bool) (map[string]int, error)
func (fq *FqdnService) MakeConcurrentCalls(url string, client *http.Client, setNodes map[string]int) error {
fq.log.Debug("Making Concurrent Calls...")
fqdnResultChan := make(chan string)
for i := 0; i < constants.MIN_NUMBER_OF_CALLS; i++ {
minNumberOfCalls := 3 * len(setNodes)
for i := 0; i < minNumberOfCalls; i++ {
go func(fqdnResultChan chan string) {
res, err := client.Get(url)
if err != nil {
Expand All @@ -127,7 +128,7 @@ func (fq *FqdnService) MakeConcurrentCalls(url string, client *http.Client, setN
}(fqdnResultChan)
}

for i := 0; i < constants.MIN_NUMBER_OF_CALLS; i++ {
for i := 0; i < minNumberOfCalls; i++ {
chanResult := <-fqdnResultChan
if chanResult == constants.CHAN_RESULT_ERROR_MESSAGE {
continue
Expand Down

0 comments on commit 83a4d91

Please sign in to comment.