Spring Cloud Contract 未检查 consumer/provider 是否匹配

Spring Cloud Contract not checking consumer/provider matching or not

我正在使用 spring-boot-gradle-plugin 2.1.9.RELEASE, spring-cloud-contract-gradle-plugin 2.1。 3.RELEASE 和 spring-cloud-dependencies Greenwich.SR3

对于消费者和提供者不匹配的合同,例如

created_at: $(consumer("NOT A DATE"), producer(anyDate()))

之前预期的错误如下:

Exception in thread "main" Assertion failed: 

assert testSide ==~ Pattern.compile(stubSide.optionalPattern())

但现在我注意到相同的合约代码不会像预期的那样出错。它编译并生成单元测试并成功存根,而无需检查消费者和提供者端是否相互匹配。

我尝试使用一些旧版本的验证器和gradle插件,但仍然编译成功。

请升级到 Greenwich.SR4 和 Spring Cloud Contract 2.1.4 (https://github.com/spring-cloud/spring-cloud-contract/commit/22d7be7e96cfa7343cc34a1376276b7c555cf1f4 and https://github.com/spring-cloud/spring-cloud-contract/issues/1200)