Skip to content

Comments

Add waiting for secondary cache call in functional tests#163

Merged
Net-burst merged 3 commits intofeature/web-client-timeout-supportfrom
functional-tests/web-client-timeout-support
Mar 28, 2025
Merged

Add waiting for secondary cache call in functional tests#163
Net-burst merged 3 commits intofeature/web-client-timeout-supportfrom
functional-tests/web-client-timeout-support

Conversation

@osulzhenko
Copy link
Collaborator

No description provided.

@osulzhenko osulzhenko force-pushed the functional-tests/web-client-timeout-support branch from 64cc9a5 to 42a6ef2 Compare March 27, 2025 16:01
@osulzhenko osulzhenko changed the base branch from master to feature/web-client-timeout-support March 27, 2025 16:09
@osulzhenko osulzhenko changed the title Functional tests/web client timeout support Add waiting for secondary cache call in functional tests Mar 27, 2025
@osulzhenko osulzhenko self-assigned this Mar 27, 2025
@osulzhenko osulzhenko added the tests functional Kotlin tests label Mar 27, 2025
Copy link
Collaborator

@Net-burst Net-burst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

mockServerClient.retrieveRecordedRequests(getSecondaryCacheRequest(uuidKey))
fun getSecondaryCacheRecordedRequests(uuidKey: String): Array<out HttpRequest>? {
val secondaryCacheRequest = getSecondaryCacheRequest(uuidKey)
waitUntil({ mockServerClient.retrieveRecordedRequests(secondaryCacheRequest)?.isNotEmpty() == true })
Copy link
Collaborator

@marki1an marki1an Mar 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be simplified?
waitUntil({ mockServerClient.retrieveRecordedRequests(secondaryCacheRequest)?.isNotEmpty() }) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good call. I used a safer approach in case it returned null, but investigation shows that retrieveRecordedRequests can't return null. So, I updated it.

@osulzhenko osulzhenko requested a review from marki1an March 28, 2025 16:38
@Net-burst Net-burst merged commit 7dce6e1 into feature/web-client-timeout-support Mar 28, 2025
@Net-burst Net-burst deleted the functional-tests/web-client-timeout-support branch March 28, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests functional Kotlin tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants