Commit dc9a9f2
Fix async E2E failures: OIDC timeout, metrics crash, Karate timeout
Three related fixes for the second (async) test suite:
1. CustomJwtDecoderProviderConfigurationUtils: the lazy OIDC decoder's
RestTemplate had no timeout. Under CI load with 16 services, the
OIDC discovery call to keycloak:8080 could take >30s, blocking all
5 parallel Karate threads until Karate's own 30s timeout fired.
Add connectTimeout=10s and readTimeout=15s via
SimpleClientHttpRequestFactory so the call fails fast and retries.
2. docker-compose-v1.yml: metrics depends_on now includes
clickhouse:service_healthy. The metrics service calls log.Fatal
on any ClickHouse query error, killing the process. Without the
dependency, metrics started before ClickHouse was ready, received
its first Kafka metric, tried to insert, got a connection error,
and crashed — making port 8070 disappear after wait_for_port passed.
3. karate-config.js: raise Karate's readTimeout from the default 30s
to 90s and connectTimeout to 10s. With 16+ containers running on a
shared CI runner, operations that take 1-5s in the first test suite
(6 containers) can take 30-60s in the second (16 containers). The
old 30s Karate timeout was too tight for this environment.
4. Makefile: add explicit OIDC endpoint readiness check
(curl --retry on .well-known/openid-configuration) before both test
suites. This ensures the lazy decoder's very first call finds
Keycloak fully initialized, not just TCP-reachable on port 8080.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 94ce471 commit dc9a9f2
4 files changed
Lines changed: 16 additions & 1 deletion
File tree
- java
- apitest/src/test/java
- middleware/registry-middleware/authorization/src/main/java/dev/sunbirdrc/registry/authorization
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| 341 | + | |
| 342 | + | |
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
0 commit comments