|
|
@@ -512,8 +512,11 @@ class AiYunyiDetectVideoContractTest {
|
|
|
try {
|
|
|
return invokePropagating(host, name, args);
|
|
|
} catch (RuntimeException e) {
|
|
|
- fail("契约方法 " + HOST_CLASS + "#" + name + " 调用失败:" + e.getMessage());
|
|
|
- throw new IllegalStateException("unreachable", e);
|
|
|
+ // 异常流用例以 assertThrows(RuntimeException.class, () -> call(...)) 断言快速失败,
|
|
|
+ // 原始 RuntimeException 必须原样上抛。原先把业务异常改写为 AssertionError
|
|
|
+ // 会让 assertThrows 判定「异常类型不符」而恒红(测试装置缺陷,非实现缺陷)。
|
|
|
+ // 仅修正异常传播,不改动任何断言与用例。
|
|
|
+ throw e;
|
|
|
}
|
|
|
}
|
|
|
|