Commit 6f1bd8f
authored
KAFKA-18973 gracefully stopping test execution if .git does not exist (#20703)
The test logic covers three main scenarios:
1. Running from the Kafka Root Directory
Action: The test immediately finds the .git directory.
Result: It uses this location to correctly find the schema file and
runs the test successfully.
2. Running from a Subdirectory
Action: The test searches up the directory tree (e.g., from
generator/ or generator/src/test/java/).
Result: It finds the .git directory at the Kafka root, uses that
root to build the correct path to the schema file, and runs the test
successfully.
3. Running from a Source Release (No Git)
Action: The test searches all the way up the entire directory tree
to the filesystem root.
Result: It never finds the .git directory, and the test skips
gracefully with a message.
Reviewers: Chia-Ping Tsai <[email protected]>1 parent 8c794fc commit 6f1bd8f
File tree
1 file changed
+15
-7
lines changed- generator/src/test/java/org/apache/kafka/message/checker
1 file changed
+15
-7
lines changedLines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| |||
0 commit comments