Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

protomap-test-java

A synthetic code base of the fictional company Acme for testing ProtoMap: 400 gRPC services with 3057 methods in 20 domains, and 11386 protobuf messages with 49571 fields, many nested several levels deep.

It is generated, with the seven other protomap-test-* repositories, from one catalog of Acme's APIs by shell/scripts/fixtures generate in protomap-source. Do not edit it by hand: the generator refuses to overwrite edited files. The repositories own disjoint domains and call each other's services, so each holds copies of the protobuf files it needs from the others, byte for byte as their owners have them.

Layout

Java 21 and Spring Boot 3 run a modular finance server. api/ compiles the vendored contracts in proto/ with protobuf-maven-plugin; generated protobuf messages and grpc-java stubs stay under each module's target/. domains/ contains constructor-injected workflows, gRPC endpoints, mapper interfaces and implementations, record DTOs, and JDBC repository adapters. platform/ supplies channel lookup, deadlines, codecs, retries, and event executors. application/ discovers all 400 @GrpcService endpoints behind the identity-checking global interceptor. Its jobs and admin commands run under separate Spring profiles. PostgreSQL is the normal store; the smoke profile uses H2. Build from the repository root with mvn -q -B package -DskipTests, using Maven 3.9 and Java 21 or newer. The reactor forks compilation by API module to bound memory. Run the server with java -jar application/target/application-1.0.0-SNAPSHOT.jar, with ACME_SERVICE_TOKEN, the credential of its identity lookups; append --spring.profiles.active=smoke for local startup. Run mvn -q -B package for platform tests and transport-boundary checks of each service's busiest and streaming methods. Background event flows alone are marked known_gap; reflection, computed descriptors, generics, inherited handlers, and synchronous callbacks remain required.

The domains are financeportal, audit, ledger, accounting, billing, invoicing, treasury, payroll, expenses, procurement, suppliers, contracts, budgeting, assets, compliance, risk, lending, collections, banking, insurance. It calls services of analytics, anomalies, appointments, audiences, authorization, benefits, campaigns, careplans, catalog, certificates, chat, checkout, community, configuration, content, corporateevents, customers, datahub, datasets, deliveries, devices, dispatch, documents, driverapp, drivers, edgegateway, employeeportal, employees, experiments, featureflags, featurestore, fleet, forecasting, forms, fraud, fuel, fulfillment, giftcards, helpdesk, identity, inventory, itsm, keymanagement, labeling, learning, licensing, lineage, localization, loyalty, maintenance, media, merchandising, messaging, metrics, modelregistry, notifications, onboarding, orders, patientapp, patients, payments, performance, personalization, pipelines, prescriptions, pricing, promotions, ratelimiting, recommendations, recruiting, returns, reviews, routing, scheduling, search, secrets, sellers, shipping, surveys, telehealth, telematics, timekeeping, travel, webbff, webhooks, workplaces, yards too.

Oracle

expected.json lists what scanning the repository must find: every handler, every call a handler or a program makes, and every field-level flow from where a handler has data to where a call or its response takes it, each tagged with the shape of the code that makes it. Its schema is documented in shell/fixtures/oracle.py of protomap-source, and shell/scripts/fixtures verify checks a scan against it.

The code mixes in, on purpose, what makes static analysis of real code bases hard. Flows by pattern:

Pattern Flows
anonymous_class 965
any_roundtrip 940
application_event 978
async_each 514
batch_job 3
bidi_call 523
blocking_stub 1840
builder_chain 920
channel_registry 1031
client_stream_call 415
completable_fanout 2015
dynamic_descriptor 1011
future_stub 823
generic_call 1089
inner_adapter 993
json_roundtrip 982
loop_each 517
mapper_interface 1004
method_reference 860
oneof_switch 2729
optional_chain 923
port_adapter 1137
record_dto 942
reflection_copy 968
request_echo 4558
retry_lambda 232
server_stream_call 931
stream_each 603
stream_pipeline 955
to_builder 989

Flows whose values pass through something on their way, by what:

Transform Flows
any_pack 344
any_pack_unpack 646
json_bytes 279
json_roundtrip 681
mapper_interface 690
oneof_switch 603
record_dto 650
reflection_copy 665
to_builder 682

Calls by pattern:

Pattern Calls
anonymous_class 198
any_roundtrip 194
application_event 209
async_each 141
batch_job 6
bidi_call 131
blocking_stub 379
builder_chain 190
channel_registry 214
client_stream_call 134
completable_fanout 443
dynamic_descriptor 216
future_stub 175
generic_call 227
inner_adapter 205
json_roundtrip 204
loop_each 144
mapper_interface 215
method_reference 181
oneof_switch 520
optional_chain 192
port_adapter 236
record_dto 194
reflection_copy 193
retry_lambda 54
server_stream_call 259
stream_each 164
stream_pipeline 200
to_builder 209

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages