googleapis / googleapis/google-cloud-java

[java-pubsub] JDK 24 support and Mockito

未关闭
#13,046 2 条评论 0 个 reaction 已指派 1 人 已被 @michaelpri10 认领 在 GitHub 查看
api: pubsub priority: p3
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
154

描述

> Seeing a `PublisherImplTest.testShutDown:1035 » IllegalArgument Could not create type` error that seems related to this dependency update as the [referenced line](https://github.com/googleapis/java-pubsub/blob/11ccef38a5c006b3810cff03d4030bfebbff66ea/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java#L1035) is related to mocking the Publisher.

@michaelpri10 Easymock 5.6.0 actually has the fix for this very error (updating byte-buddy) - see https://github.com/easymock/easymock/issues/673

However this transitive byte-buddy version was not picked up because `mockito` is declared _before_ `easymock` in `google-cloud-pubsub/pom.xml`.

Flipping the order of these two dependencies did the trick.

Edit: this solution is not ideal. Let's look into upgrading mockito as well, in case it brings a later version of byte-buddy.

_Originally posted by @diegomarquezp in https://github.com/googleapis/java-pubsub/issues/2069#issuecomment-2963891932_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。