Commit 7895574
committed
fix: mock BackendUtil.getInstance in DorisSinkTest to prevent NPE
mockStatic intercepts all static methods but getInstance was not stubbed,
returning null. The batch mode constructor immediately calls
getAvailableBackend() on the null instance, causing an NPE.1 parent db47aa3 commit 7895574
1 file changed
Lines changed: 8 additions & 0 deletions
File tree
- flink-doris-connector/flink-doris-connector-flink1/src/test/java/org/apache/doris/flink/sink
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
0 commit comments