Skip to content

[9.5] test(s3): mock AWS client in close-with-session test (#4442) - #4445

Merged
Jan-Kazlouski-elastic merged 1 commit into
9.5from
backport/9.5/pr-4442
Sep 4, 2026
Merged

Jan-Kazlouski-elastic merged 1 commit into
9.5from
backport/9.5/pr-4442

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Backports the following commits to 9.5:

## Summary

`test_close_with_client_session` was making real AWS `ListBuckets` HTTP
calls with dummy credentials. That caused slow, flaky failures under
`--fail-slow=1` when network latency exceeded 1s.

The test now mocks the S3 client (same pattern as `test_ping`) and
asserts that `close()` tears down the `AsyncExitStack` used for the
client session.

## Checklists

#### Pre-Review Checklist
- [x] this PR does NOT contain credentials of any kind, such as API keys
or username/passwords (double check `config.yml.example`)
- [x] this PR has a meaningful title
- [x] this PR links to all relevant github issues that it fixes or
partially addresses
- [x] if there is no GH issue, please create it. Each PR should have a
link to an issue
- [x] this PR has a thorough description
- [x] Covered the changes with automated tests
- [x] Tested the changes locally
- [ ] Added a label for each target release version (example: `v7.13.2`,
`v7.14.0`, `v8.0.0`)
- [ ] For bugfixes: backport safely to all minor branches still
receiving patch releases
- [x] Considered corresponding documentation changes
- [x] Contributed any configuration settings changes to the
configuration reference
- [x] if you added or changed Rich Configurable Fields for a Native
Connector, you made a corresponding PR in
[Kibana](https://github.com/elastic/kibana/blob/main/packages/kbn-search-connectors/types/native_connectors.ts)

#### Changes Requiring Extra Attention

- [ ] Security-related changes (encryption, TLS, SSRF, etc)
- [ ] New external service dependencies added.

## Related Pull Requests

* #4441 — Outlook LDAP retry
fix (where the flake was first observed)

## Release Note

n/a — test-only change.

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic merged commit 620ac08 into 9.5 Sep 4, 2026
2 checks passed
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic deleted the backport/9.5/pr-4442 branch September 4, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants