Commit 101fc92
opencode
fix(testcontainers): add active rw probe to vshard storages readiness check
The readiness check from 3ad515a relied on vshard.router.info() reporting
bucket.available_rw == vshard.router.bucket_count(). This is a passive
view of the router-side bucket accounting and does not always match the
actual rw-handshaked state of each storage in the early moments of a
fresh cluster: the third CI run (run 27611921481) still failed with
'Timeout exceeded while waiting for vshard storages to complete
handshake' on spring-data32.RepositoryViaJavaConfigTest, even though
the previous data27/data31 classes had started successfully within
the same Maven reactor.
Add a second, active tier to the check: after the passive
vshard.router.info() pre-check passes, perform a real read-write call
(vshard.router.callrw(1, 'box.info', {})) wrapped in pcall. This is the
most direct signal that the storage-side handshake has actually
finished for at least one storage. A successful rw call proves that
the very first CRUD call (e.g. truncate issued by @beforeeach) will
not fail with VHANDSHAKE_NOT_COMPLETE.
The probe is intentionally kept on a single Lua line because the
testcontainers command pipe flattens newlines, which would otherwise
confuse the Tarantool Lua parser around 'end' (observed in local
verification: the multi-line form produced 'end expected near local').
Verified locally on 3.5.0:
- spring-data31 TarantoolTemplateViaJavaConfigTest: 35/35 PASS
- spring-data27 TarantoolTemplateViaJavaConfigTest: 35/35 PASS1 parent 3ad515a commit 101fc92
1 file changed
Lines changed: 51 additions & 10 deletions
File tree
- testcontainers/src/main/java/org/testcontainers/containers/cluster/vshard
Lines changed: 51 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
90 | 103 | | |
91 | 104 | | |
92 | 105 | | |
| |||
670 | 683 | | |
671 | 684 | | |
672 | 685 | | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
677 | 701 | | |
678 | 702 | | |
679 | 703 | | |
680 | | - | |
| 704 | + | |
681 | 705 | | |
682 | 706 | | |
683 | | - | |
684 | | - | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
685 | 724 | | |
686 | 725 | | |
687 | | - | |
688 | | - | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
689 | 730 | | |
690 | 731 | | |
691 | | - | |
| 732 | + | |
692 | 733 | | |
693 | 734 | | |
694 | 735 | | |
| |||
0 commit comments