#mockk help

1 messages · Page 1 of 1 (latest)

topaz bronzeBOT
#

<@&1008423204219531294> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

It sounds like you may need to update your mockk library to a version that is compatible with Java 17 and Gradle 7.6. Make sure you are using the latest version of mockk and check the release notes for any compatibility issues with your updated environment.

If you are still experiencing issues, try cleaning and rebuilding your project to ensure that all dependencies are properly resolved. You may also want to check for any changes in the way mockk is used in your project, as there may have been updates to the library that require modifications to your code.

If you continue to encounter null pointer exceptions, consider reaching out to the mockk community or posting on forums for further assistance. Good luck!

#

You can reach out to the Mockk community on their official website, social media platforms such as Twitter or LinkedIn, or on forums and discussion boards related to software testing and development. Additionally, you can join online communities and groups dedicated to Mockk users on platforms like GitHub or Stack Overflow.

lusty marlin
#

@latent stone okay so

#

did you do anything other than just upgrade 11 -> 17?

#

did you also upgrade dependencies or nah?

#

and is this junit or something else

fervent lava
#

also isnt it @BeforeEach?

lusty marlin
#

I think he is using https://mockk.io/#spy

#

okay well lets do one of those at a time

#

lets go back to java 11 and kotlin 1.6

#

and just leave gradle upgraded

lusty marlin
#

okay is there anything in the logs?

lusty marlin
#

can we bisect?

#

go to java 15

#

lets see what version you start to have issues at

latent stone
#

Can do .. giving it a try now

#

Seems to work.

lusty marlin
#

okay try 16

latent stone
#

Works too .. no errors there :/

lusty marlin
#

okay now to 17

#

but get a "fresh" 17

latent stone
#

Can you explain fresh?

#

I’m using corretto 17.0.9

lusty marlin
#

like just download a new one

#

idk

latent stone
#

Got it

latent stone
#

Sorry back. It didn’t work but I see this warning before test fails .. unsupported class file major version 61 net.byte buddy.jar.ask.ClassReader

#

Byte buddy is a dependcy of mockk

lusty marlin
#

there we are

#

so the issue is with bytebuddy

#

try updating mockk

severe jasper
#

Says right on their front page some stuff doesn't work with jdk16+. Always read the documentation.

lusty marlin
#

lol shit

#

good news is that in the future this sort of thing won't be an issue

severe jasper
#

Meh, it's always an issue.

lusty marlin
#

and when people use that there won't be breakages when new versions come out like there are now

lusty marlin
#

thats not whats happening here though

#

this is about reflecting over builtins

#

he is making spys of his own stuff

#

i think if he updates it should be fine

severe jasper
#

How I see issues like this: Someone else has had the problem before. Read the documentation.

#

Search issues.

lusty marlin
#

this isn't that though

latent stone
#

Pinning bytebuddy to a specific version fixed soooo much. One last testing error left tho .. causing 5 tests to fail io.micronaut.http.exceptions.HTTPClientResponseException:not found

#

Soooo close :’( …

latent stone
#

I think it has to do with mock static …

lusty marlin
topaz bronzeBOT
#

@latent stone

Your question has been closed due to inactivity.

If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.

Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.

When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.

Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.

With enough info, someone knows the answer for sure 👍