Skip to content

Return tqe2 testcontainers implementation#86

Draft
dkasimovskiy wants to merge 10 commits into
masterfrom
return-tqe2-testcontainers-implementation
Draft

Return tqe2 testcontainers implementation#86
dkasimovskiy wants to merge 10 commits into
masterfrom
return-tqe2-testcontainers-implementation

Conversation

@dkasimovskiy
Copy link
Copy Markdown
Contributor

@dkasimovskiy dkasimovskiy commented Jun 1, 2026

Описание

Обновление реализаций контейнеров TQE2 и TQE3 с улучшенной обработкой ошибок и конфигурацией. Добавлены
абстрактные классы для лучшей организации кода.

Основные изменения

  • Обновлены реализации TQE2ClusterImpl и TQE3ClusterImpl с улучшенной логикой запуска
  • Модифицированы конфигураторы с улучшенной валидацией
  • Добавлены абстрактные базовые классы AbstractTQECluster и AbstractTQEConfigurator

Файлы

  • Обновлены реализации кластеров и конфигураторов
  • Обновлены интеграционные тесты
  • Добавлены абстрактные классы

I haven't forgotten about:

  • Tests
  • Changelog
  • Documentation
    • JavaDoc was written
  • Commit messages comply with the guideline
  • Cleanup the code for review. See checklist

Related issues:

dkasimovskiy and others added 6 commits June 1, 2026 18:49
- Add @JsonAlias(\"publisher\") to GrpcConfiguration.producer
- Add PUBLISHER GrpcRole for TQE 2.x compatibility
- Update GrpcContainerImpl to report both PRODUCER and PUBLISHER roles

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Apply Template Method pattern to TQE3ClusterImpl with abstract startContainers()
- Rename TQEClusterImpl → TQE3ClusterImpl, FileTQEConfigurator → FileTQE3Configurator
- Add TQE2ClusterImpl overriding startContainers() for 2.x parallel startup
- Add FileTQE2Configurator extending FileTQE3Configurator with routerRole=app.roles.api
- Fix static method hiding by using newBuilder() in FileTQE2Configurator

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Move 3.x proto files to testcontainers/src/test/proto/tqe3/
- Add 2.x proto files in testcontainers/src/test/proto/tqe2/ with java_package=v2
- Configure separate protobuf-maven-plugin executions for tqe3 and tqe2
- Split tqe2 execution into java and grpc to avoid output directory overwrite

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add CommonTestTQE2.java and CommonTestTQE3.java base test classes
- Add FileTQE2ConfiguratorTest.java and FileTQE3ConfiguratorTest.java
- Add TQE2ClusterImplTest.java and TQE3ClusterImplTest.java
- Restructure test resources into tqe2/ and tqe3/ directories
- Update protobuf imports for TQE 2.x (tarantool.queue_ee.v2 package)
- Remove old CommonTest.java, FileTQEConfiguratorTest.java, TQEClusterImplTest.java

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…uration

- Refactor TQE3ClusterImpl with improved error handling and startup logic
- Update gRPC container implementation for better compatibility
- Modify configurators for TQE2 and TQE3 with enhanced validation
- Update integration tests for both TQE2 and TQE3 clusters
- Adjust cluster implementations with better lifecycle management

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…er duplication

- Fix TQE3 startup: queue -> configure -> grpc (was queue+grpc -> configure)
  TQE2 preserves original: queue -> grpc -> configure
- Move shared Builder to AbstractTQEConfigurator with abstract doBuild()
- Remove duplicated CONFIGURATOR_ERROR_MSG, Logger from subclasses
- Unify factory method: newBuilder -> builder in FileTQE2Configurator
- Extract hardcoded linux/amd64 platform to Builder.withPlatform() param
- Restore original timeouts: 10s startup, 5s bootstrap
- Remove test_output.log from tracking, add to .gitignore
- Remove redundant configurator != null check in AbstractTQECluster.stop()

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dkasimovskiy dkasimovskiy force-pushed the return-tqe2-testcontainers-implementation branch from 4931800 to e323bb8 Compare June 1, 2026 15:49
dkasimovskiy and others added 4 commits June 2, 2026 15:12
…hread-safety

- Replace AbstractTQEConfigurator/FileTQE2Configurator/FileTQE3Configurator
  with single FileTQEConfigurator using tqe2Builder()/tqe3Builder() factories
- Merge CommonTestTQE2/CommonTestTQE3 into AbstractTQETest base class
- Restore original startTarantoolCluster/startGrpcEndpoints method names
  with correct startup order for TQE2 and TQE3
- Add volatile to isClosed for thread-safety
- Use dedicated STARTUP_EXECUTOR instead of ForkJoinPool.commonPool()

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Remove I/O from constructor — config parsing, Docker network creation,
and container initialization now happen on first access via synchronized
lazy accessors (parsedConfig, setupNetwork, queue, grpc). This prevents
half-initialized state on errors and defers all side effects until
cluster startup.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…tainerImpl

- Fix .yml/.yaml extension validation in GrpcContainerImpl using
  getFileName().toString().endsWith() instead of Path.endsWith()
  which only matches path components, not filename suffixes
- Wrap ManagedChannel usage in try-finally to prevent resource leaks
- Replace empty onError with RuntimeException to surface stream errors
- Replace Thread.sleep(1000) with connectivity state polling
- Make ObjectMapper a static final field instead of per-test instance

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Make FileTQEConfigurator constructor private (enforce Builder usage)
- Move YAML parsing out of GrpcContainerImpl constructor to configure()
- Extract ManagedChannel creation helper into AbstractTQETest
- Deduplicate invalid gRPC config YAML via parameterized method
- Remove redundant null-check in AbstractTQECluster.stop()
- Remove duplicate default cluster name logic in Builder.withClusterName()
- Revert CONFIGURATOR_ERROR_MSG to private (inner class has access)
- Rename publisherAddress to producerAddress in TQE3ClusterImplTest

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.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.

1 participant