testcontainers / testcontainers-go

Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done.
https://golang.testcontainers.org
MIT License
3.65k stars 502 forks source link

[Bug]: various random test failures #2685

Closed stevenh closed 4 weeks ago

stevenh commented 3 months ago

Various tests fail randomly, using this issue as a tracking issue for extracting fixes from https://github.com/testcontainers/testcontainers-go/pull/2664

### PRs to raise
- [x] fix(redpanda): wait for
- [x] fix(elasticsearch): wait for
- [x] fix(registry): wait for
- [x] fix: nginx request failures
- [x] fix: container timeout test
- [x] fix(compose): container locking
- [x] chore: remove unused parameters
- [x] chore: improve error wrapping
- [x] fix: container logging deadlocks
- [x] chore: increase timeout values
- [x] fix(network): new example test failure
- [x] fix: readiness hook back off
- [x] fix: skip unhealthy
- [x] fix: ignore in progress errors during clean up
- [x] fix(wait): log test timeout
- [x] fix: parallel containers clean race
- [x] fix: resource clean up for tests and examples
- [x] fix: filter context errors from log production
- [x] chore: remove unused params from defaultPreCreateHook
- [x] docs: improve docs for container methods
- [x] fix(compose): remove test volumes
- [x] fix(reaper): refactor to allow retries and fix races
- [x] chore(registry): disable build log
- [x] chore(mockserver): silence warning about internal port
- [x] chore: remove obsolete compose version
- [x] fix(valkey): fix port race
- [x] chore: improve lifecycle errors
- [x] fix(mysql): add missing error check in example
- [x] fix: authentication tests on WSL
- [x] fix(registry): compatibility with WSL
- [x] fix(mongodb): replica test failures
- [x] fix!: docker authentication setup
- [x] fix(wait): data race in test
- [x] fix: logging restart
- [x] fix(kafka): port race on start
- [x] fix(nats): port race on start up
- [x] fix(redis): port race
- [x] fix(milvus): racy container setup
- [x] fix(redpanda): race condition on port check
- [x] feat(wait): skip internal host port check
- [x] fix(inbucket): expose POP3 and wait for all ports
- [x] test: fix image label test
- [x] test: racy port creation in port forwarding tests
- [x] test: add retry on system error test
- [x] fix: port forwarding race condition
- [x] fix: missing image build errors
### PRs to review
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2651
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2686
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2687
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2688
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2689
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2690
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2691
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2692
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2693
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2694
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2695
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2696
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2697
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2698
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2699
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2706
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2705
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2707
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2708
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2709
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2710
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2711
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2712
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2713
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2714
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2715
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2716
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2717
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2718
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2719
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2720
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2721
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2722
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2723
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2724
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2727
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2728
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2738
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2790
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2792
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2791
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2793
- [ ] https://github.com/testcontainers/testcontainers-go/pull/2794
stevenh commented 4 weeks ago

All PR now merged or closed, so closing this out.

Big thanks to @mdelapenya for all the reviews 🥇