Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: introduce ExitWaitStrategy #684

Merged
merged 4 commits into from
Jul 7, 2024
Merged

feat!: introduce ExitWaitStrategy #684

merged 4 commits into from
Jul 7, 2024

Conversation

DDtKey
Copy link
Collaborator

@DDtKey DDtKey commented Jul 7, 2024

Allows you to wait for the container to exit, optionally with a specific exit code.

Closes #676

… multiple times

The interface has been changed a bit to support advanced configuration of the strategy. For example, to expect a message to appear twice in `stdout`:

```rs
WaitFor::log(
    LogWaitStrategy::stdout("server is ready")
    .with_times(2),
)
```

Closes #675
Allows you to wait for the container to exit, optionally with a specific exit code.

Closes #676
Copy link

netlify bot commented Jul 7, 2024

Deploy Preview for testcontainers-rust ready!

Name Link
🔨 Latest commit 717203a
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-rust/deploys/6689dd6740420c0008ee1b07
😎 Deploy Preview https://deploy-preview-684--testcontainers-rust.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

# Conflicts:
#	testcontainers/src/core/logs.rs
#	testcontainers/src/core/wait/mod.rs
#	testcontainers/tests/async_runner.rs
@DDtKey DDtKey enabled auto-merge (squash) July 7, 2024 00:15
@DDtKey DDtKey merged commit 73792f9 into main Jul 7, 2024
13 checks passed
@DDtKey DDtKey deleted the feat/wait-for-exit branch July 7, 2024 00:18
This was referenced Jul 7, 2024
DDtKey pushed a commit that referenced this pull request Jul 7, 2024
## 🤖 New release
* `testcontainers`: 0.19.0 -> 0.20.0

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.20.0] - 2024-07-07

### Details
#### Bug Fixes
- [❗] Drop `Clone` impl for `ContainerRequest`
([#680](#680))
- Exclude image pulling time from startup timeout
([#687](#687))
- Waiting for mutiple messages from the same log frame
([#688](#688))
- Pass correct log-source for `stderr` wait strategy
([#692](#692))

#### Features
- Introduce log consumers
([#681](#681))
- Introduce `LoggingConsumer` based on `log` crate
([#682](#682))
- [❗] Enhance `LogWaitStrategy` to wait for message appearance multiple
times
([#683](#683))
- [❗] Introduce `ExitWaitStrategy`
([#684](#684))

#### Miscellaneous Tasks
- Get rid of outdated variables naming
([#679](#679))
- Relax log level for log producer error
([#685](#685))
- Re-configure blocking runtime
([#690](#690))

#### Performance
- Avoid spawning log producer without consumers
([#689](#689))

#### Refactor
- Internal log processing structures
([#678](#678))

#### Styling
- Apply clippy suggestion
([#693](#693))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to wait for container to finish running?
1 participant