You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Reschke (Jira)" <ji...@apache.org> on 2022/12/01 08:28:00 UTC

[jira] [Commented] (OAK-10013) oak-run-commons: tests fail on Windows Subsystem for Linux

    [ https://issues.apache.org/jira/browse/OAK-10013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17641752#comment-17641752 ] 

Julian Reschke commented on OAK-10013:
--------------------------------------

FWIW, updating Mockito did not help.

> oak-run-commons: tests fail on Windows Subsystem for Linux
> ----------------------------------------------------------
>
>                 Key: OAK-10013
>                 URL: https://issues.apache.org/jira/browse/OAK-10013
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: run
>            Reporter: Julian Reschke
>            Priority: Major
>
> {noformat}
> [ERROR] Tests run: 15, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.91 s <<< FAILURE! - in org.apache.jackrabbit.oak.index.indexer.document.flatfile.FlatFileSplitterTest
> [ERROR] getSplitNodeTypeNames(org.apache.jackrabbit.oak.index.indexer.document.flatfile.FlatFileSplitterTest)  Time elapsed: 1.541 s  <<< ERROR!
> java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
>         at org.mockito.internal.configuration.plugins.PluginLoader$1.invoke(PluginLoader.java:88)
>         at com.sun.proxy.$Proxy14.isTypeMockable(Unknown Source)
>         at org.mockito.internal.util.MockUtil.typeMockabilityOf(MockUtil.java:33)
>         at org.mockito.internal.util.MockCreationValidator.validateType(MockCreationValidator.java:22)
>         at org.mockito.internal.creation.MockSettingsImpl.validatedSettings(MockSettingsImpl.java:250)
>         at org.mockito.internal.creation.MockSettingsImpl.build(MockSettingsImpl.java:232)
>         at org.mockito.internal.MockitoCore.mock(MockitoCore.java:83)
>         at org.mockito.Mockito.mock(Mockito.java:1964)
>         at org.mockito.Mockito.mock(Mockito.java:1879)
>         at org.apache.jackrabbit.oak.index.indexer.document.flatfile.FlatFileSplitterTest.getSplitNodeTypeNames(FlatFileSplitterTest.java:361)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>         at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
>         at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>         at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
>         at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>         at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>         at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
>         at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
>         at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
>         at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
>         at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
>         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
>         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
>         at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
>         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
>         at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
>         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
>         at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
>         at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>         at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>         at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>         at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>         at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
>         at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
>         at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
>         at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
> Caused by: java.lang.IllegalStateException: Failed to load interface org.mockito.plugins.MockMaker implementation declared in java.lang.CompoundEnumeration@1fc32e4f
>         at org.mockito.internal.configuration.plugins.PluginInitializer.loadImpl(PluginInitializer.java:58)
>         at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:69)
>         at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
>         at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:29)
>         at org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:20)
>         at org.mockito.internal.util.MockUtil.<clinit>(MockUtil.java:28)
>         ... 38 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
>         at org.mockito.internal.configuration.plugins.PluginInitializer.loadImpl(PluginInitializer.java:53)
>         ... 43 more
> Caused by: org.mockito.exceptions.base.MockitoInitializationException:
> Could not initialize inline Byte Buddy mock maker.
> It appears as if your JDK does not supply a working agent attachment mechanism.
> Java               : 11
> JVM vendor name    : Ubuntu
> JVM vendor version : 11.0.17+8-post-Ubuntu-1ubuntu222.04
> JVM name           : OpenJDK 64-Bit Server VM
> JVM version        : 11.0.17+8-post-Ubuntu-1ubuntu222.04
> JVM info           : mixed mode, sharing
> OS name            : Linux
> OS version         : 5.10.16.3-microsoft-standard-WSL2
>         at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.<init>(InlineDelegateByteBuddyMockMaker.java:246)
>         at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.<init>(InlineByteBuddyMockMaker.java:25)
>         ... 48 more
> Caused by: java.lang.IllegalStateException:
> Mockito could not self-attach a Java agent to the current VM. This feature is required for inline mocking.
> This error occured due to an I/O error during the creation of this agent: java.io.IOException: No such file or directory
> Potentially, the current VM does not support the instrumentation API correctly
>         at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.<clinit>(InlineDelegateByteBuddyMockMaker.java:178)
>         ... 49 more
> Caused by: java.io.IOException: No such file or directory
>         at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.base/java.io.File.createTempFile(File.java:2129)
>         at java.base/java.io.File.createTempFile(File.java:2175)
>         at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.<clinit>(InlineDelegateByteBuddyMockMaker.java:125)
>         ... 49 more
> {noformat}
> "git bisect" shows:
> {noformat}
> $ git bisect bad
> 003aa698363c1c35c66a9dd0028744f4c67179fa is the first bad commit
> commit 003aa698363c1c35c66a9dd0028744f4c67179fa
> Author: Amit Jain <am...@apache.org>
> Date:   Tue Nov 8 09:33:07 2022 +0530
>     OAK-9984: FlatFileSplitterTest reliably failing (#745)
>     - Replace file length comparisons with file content comparison
>     - Creating temporary files in the ./target directory
>  .../document/flatfile/FlatFileSplitterTest.java    | 66 +++++++++++++++++-----
>  .../oak/index/DocumentStoreIndexerIT.java          | 10 ++++
>  2 files changed, 61 insertions(+), 15 deletions(-)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)