Code Monkey home page Code Monkey logo

Comments (4)

pavlinskyb avatar pavlinskyb commented on August 11, 2024

It appears that when doing the Maven build on Windows that the test case "PrometheusListenerTest" fail's because of the JMX file "src/test/resources/simple_prometheus_example.jmx" does not contain valid XML but contains the following text path to another file "../../../docs/examples/simple_prometheus_example.jmx" this is causing the test case to fail and throws the following error.


Test set: com.github.johrstrom.listener.PrometheusListenerTest

Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.217 s <<< FAILURE! - in com.github.johrstrom.listener.PrometheusListenerTest
canReadJMX(com.github.johrstrom.listener.PrometheusListenerTest) Time elapsed: 0.022 s <<< ERROR!
com.thoughtworks.xstream.io.StreamException:
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)
at com.thoughtworks.xstream.io.xml.XppReader.(XppReader.java:63)
at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1085)
at org.apache.jmeter.save.SaveService.readTree(SaveService.java:442)
at org.apache.jmeter.save.SaveService.loadTree(SaveService.java:425)
at com.github.johrstrom.listener.PrometheusListenerTest.canReadJMX(PrometheusListenerTest.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:410)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not . (position: START_DOCUMENT seen .... @1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
... 28 more

from jmeter-prometheus-plugin.

johrstrom avatar johrstrom commented on August 11, 2024

Ok, thanks for the clarification. The symlink works on Linux, but doesn't on Windows. I'll work something up so that it (a) only holds one file but that file can be used in testing. So I'll remove the src/test symlink and copy over the docs/examples during the tests.

from jmeter-prometheus-plugin.

johrstrom avatar johrstrom commented on August 11, 2024

Can you try this branch below? It may fix the issue. I've removed the src/test file and copy it during the test process resources phase of the build.

https://github.com/johrstrom/jmeter-prometheus-plugin/tree/windows-build-errors

from jmeter-prometheus-plugin.

johrstrom avatar johrstrom commented on August 11, 2024

This issue seems to have been fixed by your closing. Thanks for the ticket and comments. I'm pulling the fix into master now.

from jmeter-prometheus-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.