googleapis / googleapis/google-cloud-java

[java-pubsub] JDK 24 support and Mockito

Ouverte
#13,046 2 commentaires 0 réactions 1 personne assignée Réclamée par @michaelpri10 Voir sur GitHub
api: pubsub priority: p3
Langage dominant
Java
Étoiles
2.1k
Forks
1.2k
Merge moyen
1 j 23 h
PR mergées (30 j)
154

Description

> 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_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.