mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-10-31 10:11:49 +08:00
sweep every module to satisfy the new method-name rule, renaming about 40 methods together with their interface, implementation, test and cli call sites: store find() lookups become get(), analytics queryLatest/queryHistory become getLatest/getHistory, sql helper query() becomes spec()/sql(), jwks fetch() becomes load(), and the cursor record component queryDigest becomes requestDigest no behavior changes; full unit suite (5278 tests) and both quality gates stay green
DC3 Common Test
Overview
dc3-common-test is the shared test-support module of the IoT DC3 platform. It provides reusable contract tests, test
harnesses, and Testcontainers definitions so individual modules can write integration tests without re-deriving the same
fixtures.
Module Information
- Group ID: io.github.pnoker
- Artifact ID: dc3-common-test
Key Components
| Area | Components |
|---|---|
| Contract tests | SecretFieldContractTest, EnumContractTest |
| Test support | RabbitTestHarness, JsonAssertions, FixedClockConfig, GrpcInProcessExtension |
| Testcontainers | PgTimescaleContainer, RabbitContainer, MqttContainer |
Dependencies
spring-boot-starter-test,reactor-test,spring-rabbit-test,grpc-testing
Usage
Add as a test-scoped dependency. Integration tests requiring real infrastructure use the Testcontainers helpers
(PostgreSQL + TimescaleDB, RabbitMQ, MQTT), which need a Docker-compatible container runtime.
Build Instructions
mvn -s .mvn/settings.xml -pl dc3-common/dc3-common-test -am package
Testing
This module currently has no module-specific automated tests. Verify generated or production sources by compiling the affected reactor from the repository root:
mvn -s .mvn/settings.xml -q -pl dc3-common/dc3-common-test -am -DskipTests compile
Related Modules
dc3-e2e— backend end-to-end suite built on these helpers- Consumed test-scoped by
dc3-common-*anddc3-center-*modules