data-integrations / http

Sink plugin to send the messages from the pipeline to an external http endpoint
http://docs.cask.co/cdap
Other
1 stars 29 forks source link

[PLUGIN-1740] Added Wait Time Between Request Field in HTTP Sink #153

Closed psainics closed 9 months ago

psainics commented 9 months ago

Added Wait Time Between Request Field in HTTP Sink

Jira : Plugin-1740

Description

Read Timeout (milliseconds) field is incorrectly being used for delay between requests, a new field is added to define delay between requests.

UI Fields changes

image

Docs

Code change

psainics commented 9 months ago

@anup-cloudsufi The field is used as a parameter for the Awaitility library, in pollDelay !

The Unit test for this is not possible. Are you referring to some other code ?

Awaitility.await().with()
.pollInterval(pollInterval)
.pollDelay(config.getWaitTimeBetweenPages(), TimeUnit.MILLISECONDS)
.timeout(config.getMaxRetryDuration(), TimeUnit.SECONDS)
.until(this::executeHTTPServiceAndCheckStatusCode);
anup-cloudsufi commented 9 months ago

Based on our discussion it seems it will take more to time to add unit test for it as the existing unit tests are only for macro and non-macro plugin config values and not for other features. We should take this separately to add these tests.