You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kerberos can be enabled per service. Hadoop/HDFS, Hive Metastore, Kafka, Schema Registry, and Kafka UI expose dedicated Kerberos switches; set `kerberos = true` to start the shared KDC and then enable auth for the services that should use it.
43
62
44
63
```kotlin
45
64
@BigDataTest(
46
65
kerberos =true,
66
+
hdfs =true,
67
+
hdfsKerberos =true,
47
68
hiveMetastore =true,
48
69
hiveMetastoreKerberos =true,
49
70
kafka =true,
@@ -54,6 +75,20 @@ Kerberos can be enabled per service:
54
75
classMyKerberosIntegrationTest
55
76
```
56
77
78
+
JUnit tests can also route container logs to the main test process console or to files:
79
+
80
+
```kotlin
81
+
@BigDataTest(
82
+
kafka =true,
83
+
schemaRegistry =true,
84
+
containerLogMode =ContainerLogMode.FILE,
85
+
containerLogDirectory ="build/container-logs",
86
+
)
87
+
classMyTroubleshootingTest
88
+
```
89
+
90
+
`ContainerLogMode.STDOUT` prefixes each line with the service name. `ContainerLogMode.FILE` writes files such as `kafka.log`, `schema-registry.log`, `hive-metastore.log`, and `hive-metastore-postgres.log`.
91
+
57
92
## Spring Boot
58
93
59
94
Add the starter and enable the kit in local-development or test configuration:
@@ -75,6 +110,12 @@ bigdata:
75
110
76
111
The auto-configuration exposes a started `BigDataTestKit` bean and closes it with the application context.
77
112
113
+
## Dependency Management
114
+
115
+
The build uses the Testcontainers BOM `org.testcontainers:testcontainers-bom:2.0.4`. In this repository it is applied once from the root `subprojects` block, so individual modules and examples should depend on Testcontainers modules without repeating the BOM.
116
+
117
+
For external consumers, import the same BOM in your own dependency-management setup before adding `bigdata-test` and any direct Testcontainers dependencies. With Testcontainers 2.x, module coordinates use the `testcontainers-` prefix, for example `org.testcontainers:testcontainers-junit-jupiter` and `org.testcontainers:testcontainers-postgresql`.
118
+
78
119
## Examples
79
120
80
121
Run the Spring example without starting containers:
The JUnit examples in `example/junit` are annotated with `@Disabled`; remove that annotation from an example class to start the configured stack.
134
+
135
+
The Spark example in `example/spark` shows a JUnit test that creates a `SparkSession` from `BigDataTestKit` endpoints and configures HDFS, Hive Metastore, Kafka, S3A, and fake GCS settings. It is also disabled by default because it starts the full container stack:
0 commit comments