[testcontainers] Support both TQE 2.x and TQE 3.x versions#86
Merged
Conversation
4931800 to
e323bb8
Compare
bitgorbovsky
requested changes
Jun 3, 2026
bcdb62d to
4d5c877
Compare
bitgorbovsky
requested changes
Jun 8, 2026
dkasimovskiy
added a commit
that referenced
this pull request
Jun 8, 2026
- Collapse AbstractTQECluster/{TQE2ClusterImpl,TQE3ClusterImpl} into a
single TQEClusterImpl (TQE3 startup order is safe for both versions).
- Unify GrpcRole.PRODUCER with "publisher" alias; drop PUBLISHER constant.
- Revert FileTQEConfigurator cosmetic changes: withClusterName/close
to master variants, image field last in Builder, default cluster name
generation back in withClusterName (with warn log).
- Rename dataForTestInvalidQueueConfig -> ...ShouldThrow to match
the pre-existing naming convention.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
dkasimovskiy
added a commit
that referenced
this pull request
Jun 8, 2026
….build() The build() fallback that generates a default cluster name when none was provided via withClusterName() was inadvertently dropped while addressing PR #86 review comment #7. Test fixtures (TQEClusterFixture, TQEClusterTest, FileTQEConfiguratorTest.simpleConfiguration) do not call withClusterName() explicitly, so removing the fallback made the cluster name "null" appear in container names (e.g. "/router-null"), which then collided on parallel/repeated runs. Restore the defensive fallback in build() so the configurator is always valid, while keeping the warn-logged fallback in withClusterName() for explicit callers (per the review comment resolution). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…meterized tests Add TQE 3.x (message-queue-ee 3.x) integration on top of the existing TQE 2.x support in testcontainers. Refactor the resulting duplication into a single parameterized test suite driven by a per-version enum, versioned cluster and gRPC strategy implementations, and shared fixtures. - New TQE 3.x wiring: image, configs, ProducerServiceGrpc client, gRPC container, bidirectional subscription. - Versioned cluster/container builders via FileTQEConfigurator.tqe3Builder /tqe2Builder; single TQEClusterImpl (TQE 3.x startup order is safe for both versions). - GrpcRole.PRODUCER accepts "publisher" as alias (TQE 2.x naming) — eliminates the version-specific role constant. - Replace TQE2ClusterImplTest + TQE3ClusterImplTest with TQEClusterIntegrationTest + TQEClusterTest parameterized over TQEVersion. - Extract GrpcTestStrategy interface with TQE2/TQE3 implementations to isolate version-specific gRPC API differences. - TQEVersion encapsulates image, configs, role names, builder/cluster factories, and gRPC strategy per version (OCP-friendly — adding a future TQE 4.x is a single new enum constant). - Migrate protobuf generation from xolstice to ascopes plugin; rename proto/config resource directories to tqe2/tqe3. - Fix GrpcContainerImpl.validateConfigPath: path.toString().endsWith() instead of Path.endsWith (path-component comparison) so the .yml extension check actually works as the error message claims. Addresses PR #86 review comments. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
296b8c8 to
6c74965
Compare
bitgorbovsky
requested changes
Jun 9, 2026
- FileTQEConfigurator: pass routerRole through private Builder constructor instead of exposing withRouterRole() setter; remove dead null check in build() - Rename GrpcTestStrategy -> TQEClient and implementations -> TQE2Client/TQE3Client - Replace Set<User> with Consumer<User> in subscribe() for flexible result handling - TQEVersion: drop unused displayName()/requiresConfigure() and trivial createCluster() factory (TQEClusterImpl is created directly in tests) - FileTQEConfiguratorTest: always call configure() (idempotent for both versions) - TQEClusterIntegrationTest: simplify size check to users.size() == result.size()
Per PR #86 review (r3381299111): ManagedChannel is an internal transport detail and should not be part of the TQEClient contract. - TQEClient.publish/subscribe: drop ManagedChannel parameter - TQE2Client/TQE3Client: take the channel in the constructor and store it as a field; remove INSTANCE singletons - TQEVersion: replace stored TQEClient field with an abstract client(ManagedChannel) factory, overridden per version - TQEClusterFixture: own the channels and the bound clients; expose publisherClient()/consumerClient() and shut down channels in close() - TQEClusterIntegrationTest: drop manual channel creation/shutdown and the now-unused ManagedChannel import
bitgorbovsky
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
В
testcontainersдобавлена поддержку двух версий TQE (2.x, 3.x).Консолидация тестов
TQEClusterIntegrationTest+TQEClusterTest(параметризованныечерез enum
TQEVersion) заменяют старыеTQE2ClusterImplTest+TQE3ClusterImplTestи абстрактные базовые классы.GrpcRole.PRODUCERтеперь принимает унаследованный от TQE 2.xалиас
"publisher", поэтому единыйTQEClusterImplработаетдля обеих версий, а
TQE2ClusterImpl/TQE3ClusterImplудалены.GrpcTestStrategyизолирует различия gRPC API (publish / Producer.produce,однонаправленная / двунаправленная подписка).
TQEVersionинкапсулирует образ, конфиги, имена ролей, фабрикиbuilder/cluster и gRPC-стратегию для каждой версии — добавление
будущей TQE 4.x сводится к одной новой константе enum'а.
Примечания
tdg2намеренно не затронута.xolsticeнаascopes;proto-файлы перенесены в
tqe2/иtqe3/.GrpcContainerImpl.validateConfigPathтеперь используетpath.toString().endsWith(".yml")(былPath.endsWith,сравнение компонентов пути) — проверка расширения теперь
действительно работает.
I haven't forgotten about:
Related issues: