我正在尝试使用PollingConditions
来期望最终会抛出异常。
then:
new PollingConditions(timeout: 3, initialDelay: 0.1, delay: 0.1).eventually {
sasClient.getSASToken(pod, targetServiceType)
thrown(NotFoundException)
}
但这会导致Groovy抱怨: Groovyc: Exception conditions are only allowed as top-level statements
有没有可能测试最终会抛出异常的情况?