fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift
http://fabric8.io
Apache License 2.0
3.35k stars 1.45k forks source link

problem running tests locally #6050

Open fs111 opened 1 month ago

fs111 commented 1 month ago

Describe the bug

I am trying to add a small feature to the library that we currently require internally (and that can potentially be contributed back). Before doing any changes I was trying to run the tests yet they never succeed on my machine. This is an Intel Mac. I have tried Java 11 and 17, but neither works.

The build stops with this error

ERROR] Failures:
[ERROR]   UploadTest$Success$SingleFile$TarCompression.bigNumbersSupported:318
Expecting
  org.apache.commons.compress.archivers.tar.TarArchiveEntry@df31e1be
to have a property or a field named "lastModifiedTime" with value
  2286-11-20T17:46:39.999Z
but value was:
  2262-04-11T23:47:16.854775Z
(static and synthetic fields are ignored)
[INFO]
[ERROR] Tests run: 240, Failures: 1, Errors: 0, Skipped: 6

Fabric8 Kubernetes Client version

SNAPSHOT

Steps to reproduce

run ./mvnw package

Expected behavior

tests pass

Runtime

other (please specify in additional context)

Kubernetes API Server version

1.25.3@latest

Environment

macOS

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

rohanKanojia commented 1 month ago

@fs111 : Sorry, we don't have CI for macos (Linux/ Windows only) . From error message, it might be a platform specific behavior that test didn't accomodate. For now you can just ignore the failing test and verify it on our CI . Maybe open a new issue about build failing on MacOS.

I am trying to add a small feature to the library that we currently require internally

Do you have some issue open for this task? Shall we open an issue about this so that we can assign it to you?

fs111 commented 1 month ago

@rohanKanojia I will try to do the build on a Linux machine.

There is no public task for this, I am experimenting with something.

manusa commented 1 month ago

I think @andreaTP took care of this while fixing the pipelines for Java 21 (basically disabling that test) Could you try with Java21? Also, maybe a different JDK distribution might work.

andreaTP commented 1 month ago

IIRC we ended up disabling the test specifically for Java 21. So with Java 21 the full build will work, but it's a tradeoff...

fs111 commented 3 weeks ago

Thanks for the replies. I will give JDK 21 a try.