Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StacktraceCollectorProfilerTest failure: AssertionError in profile method, expected 4 but got 6 #112

Open
neerajBarthwal opened this issue Aug 28, 2023 · 0 comments

Comments

@neerajBarthwal
Copy link

mvn clean package fails to run test cases

[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.331 s <<< FAILURE! -- in com.uber.profiling.profilers.StacktraceCollectorProfilerTest
[ERROR] com.uber.profiling.profilers.StacktraceCollectorProfilerTest.profile -- Time elapsed: 0.114 s <<< FAILURE!
java.lang.AssertionError: expected:<4> but was:<6>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotEquals(Assert.java:835)
at org.junit.Assert.assertEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:633)
at com.uber.profiling.profilers.StacktraceCollectorProfilerTest.profile(StacktraceCollectorProfilerTest.java:101)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
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.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:316)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Other warnings:

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit4/3.1.2/common-junit4-3.1.2.jar (26 kB at 453 kB/s)
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.uber.profiling.YamlConfigProviderTest
1693218739503 com.uber.profiling.util.ExponentialBackoffRetryPolicy: Retrying (after sleeping 169 milliseconds) on exception: java.lang.RuntimeException: Failed getting url: http://localhost/bad_url
1693218739681 com.uber.profiling.util.ExponentialBackoffRetryPolicy: Retrying (after sleeping 318 milliseconds) on exception: java.lang.RuntimeException: Failed getting url: http://localhost/bad_url
[WARNING] 1693218740009 com.uber.profiling.YamlConfigProvider: Failed to read file: http://localhost/bad_url java.lang.RuntimeException: Failed after trying 3 times
at com.uber.profiling.util.ExponentialBackoffRetryPolicy.attempt(ExponentialBackoffRetryPolicy.java:77)
at com.uber.profiling.YamlConfigProvider.getConfig(YamlConfigProvider.java:74)
at com.uber.profiling.YamlConfigProvider.getConfig(YamlConfigProvider.java:61)
at com.uber.profiling.YamlConfigProviderTest.getConfigFromBadHttpUrl(YamlConfigProviderTest.java:103)

[WARNING] 1693218740596 com.uber.profiling.YamlConfigProvider: Failed to read file: not_exiting_file java.lang.RuntimeException: Failed after trying 3 times
at com.uber.profiling.util.ExponentialBackoffRetryPolicy.attempt(ExponentialBackoffRetryPolicy.java:77)
at com.uber.profiling.YamlConfigProvider.getConfig(YamlConfigProvider.java:74)
at com.uber.profiling.YamlConfigProvider.getConfig(YamlConfigProvider.java:61)
at com.uber.profiling.YamlConfigProviderTest.getConfig(YamlConfigProviderTest.java:43)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant