Comments (7)
that last exception is odd:
10226 [ool-16-thread-1] ERROR o.j.j.e.e.JupiterEngineExecutionContext:148 - Caught exception while closing extension context: org.junit.jupiter.engine.descriptor.MethodExtensionContext@20bb6a97
org.osgi.framework.InvalidSyntaxException: Filter ended abruptly: (&(objectClass=org.osgi.test.junit5.types.Foo)(foo=baz)
at org.eclipse.osgi.internal.framework.FilterImpl$Parser.parse(FilterImpl.java:1378)
at org.eclipse.osgi.internal.framework.FilterImpl.newInstance(FilterImpl.java:180)
at org.eclipse.osgi.internal.framework.FilterImpl.newInstance(FilterImpl.java:176)
at org.osgi.framework.FrameworkUtil.createFilter(FrameworkUtil.java:72)
at org.osgi.test.common.exceptions.FunctionWithException.lambda$orElseThrow$0(FunctionWithException.java:21)
at org.osgi.test.common.filter.Filters.format(Filters.java:43)
at org.osgi.test.common.service.ServiceConfiguration.<init>(ServiceConfiguration.java:53)
at org.osgi.test.junit5.service.ServiceExtension.lambda$getServiceUseConfiguration$1(ServiceExtension.java:146)
at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$getOrComputeIfAbsent$0(ExtensionValuesStore.java:81)
at org.junit.jupiter.engine.execution.ExtensionValuesStore$MemoizingSupplier.get(ExtensionValuesStore.java:182)
at org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:58)
at org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:73)
Shouldn't the memoize have been initialized? Wouldn't not having been initialized indicate that it shouldn't be created just to be destroyed?
from osgi-test.
Specifically, the scenario for that test was that initial configuration was bad. Shouldn't that be reflected somehow in the teardown?
from osgi-test.
thirdly, I'm not sure if it's only me, but in the cli these exceptions do not result in failures. I get:
Test run finished after 10004 ms
[ 58 containers found ]
[ 0 containers skipped ]
[ 58 containers started ]
[ 0 containers aborted ]
[ 58 containers successful ]
[ 0 containers failed ]
[ 137 tests found ]
[ 0 tests skipped ]
[ 137 tests started ]
[ 0 tests aborted ]
[ 137 tests successful ]
[ 0 tests failed ]
from osgi-test.
@bjhargrave: Executive Summary is that those stack traces are expected.
Detail: Note that they all start off like this:
2020-06-11T17:23:53.1309781Z at org.junit.platform.testkit.engine.EngineTestKit.execute(EngineTestKit.java:189)
2020-06-11T17:23:53.1316787Z at org.junit.platform.testkit.engine.EngineTestKit.access$100(EngineTestKit.java:54)
2020-06-11T17:23:53.1325837Z at org.junit.platform.testkit.engine.EngineTestKit$Builder.execute(EngineTestKit.java:343)
2020-06-11T17:23:53.1335766Z at org.osgi.test.junit5.service.AbstractServiceExtensionTest.assertThatTest(AbstractServiceExtensionTest.java:126)
2020-06-11T17:23:53.1347349Z at org.osgi.test.junit5.service.AbstractServiceExtensionTest.lambda$futureAssertThatTest$0(AbstractServiceExtensionTest.java:113)
2020-06-11T17:23:53.1353191Z at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020-06-11T17:23:53.1362322Z at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
2020-06-11T17:23:53.1372502Z at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
2020-06-11T17:23:53.1380238Z at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2020-06-11T17:23:53.1387473Z at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
They are generated by these tests:
Each of these tests have the following structure:
- Start with a dummy test class with a misconfigured
@InjectService
annotation. - Run the test class in Jupiter using EngineTestKit (scheduled to run in the executor).
- Assert that the result throws the expected exception.
So the logging that you are seeing is generated by the nested JupiterTestEngine instance, which is running the dodgy test classes and so is expected to generate those exceptions.
We need to pass in the right parameters to JupiterTestEngine
in the EngineTestKit
run to suppress the logging to the console.
from osgi-test.
that last exception is odd:
Shouldn't the memoize have been initialized? Wouldn't not having been initialized indicate that it shouldn't be created just to be destroyed?
Specifically, the scenario for that test was that initial configuration was bad. Shouldn't that be reflected somehow in the teardown?
Forgive me @rotty3000 , I'm not sure that I follow here? Does my response to @bjhargrave shed any light on this for you? If not, I'm not quite sure that I've understood your point (or more precisely, I should say that I'm quite sure I have not understood your point 😄). One thing that I am fairly sure about though is that this issue is probably different to the one that prompted @bjhargrave to raise this issue.
from osgi-test.
thirdly, I'm not sure if it's only me, but in the cli these exceptions do not result in failures. I get:
As the exceptions are expected behaviour, they should not result in failures in the CLI or in Eclipse.
The Eclipse test that is failing in your screenshot is a legitimate problem, but seems completely unrelated to the OP (which was a problem with the tests for ServiceExtension
, while yours in the screenshot was a problem with tests for BundleContextExtension
). I have not seen that behaviour before - if you see it again, next time can you cut-and-past the failure stack trace(s) for the failing test(s) and I'll try and investigate.
from osgi-test.
it's fine, there is nothing overly important in my comments, just adding observations. Feel free to ignore them.
from osgi-test.
Related Issues (20)
- Add some descriptive documentation HOT 6
- osgi-test-example-mvn / org.osgi.test.example.player.test.PlayerTest are not executed HOT 4
- Need to obtain code coverage reports and interactive debugging within intellij and gradle plugin HOT 9
- Service instance are kept between different BundleContext's, Tests and test Classes HOT 4
- Provide a Junit5 Extension to start an OSGi-Connect-Framework as part of the test without any need for special setup HOT 4
- @ServiceSource should give a meaningfull error if no services are found HOT 3
- @ServiceSource should support ServiceAware<ServiceType> HOT 4
- readme link to codeql broken HOT 2
- NPE with @WithFactoryConfiguration HOT 15
- [cm] Support Systemproperties in Property HOT 4
- [cm] either create unbound config, or provide an option for it. HOT 3
- Weird behaviour when using `ConfigurationExtension` and standard config files HOT 10
- Provide a possibillity to inject and empty configuration where update has not been called yet HOT 11
- waitForRemoval and wait for modification Method for ServiceAware HOT 2
- use @With(Factory)Configuration in Annotations of User
- org.osgi.test.junit5.cm.test.ConfigAnnotationTest makes Tests lazy
- Move examples to Java 11? HOT 8
- Replacement in @WithFactoryConfigutation Properties and Factorys name
- Release 1.3.0 HOT 11
- Regression - WithConfiguration is no longer inherited
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osgi-test.