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

[dmx] move binding to new build system #5078

Merged
merged 7 commits into from
Mar 14, 2019
Merged

[dmx] move binding to new build system #5078

merged 7 commits into from
Mar 14, 2019

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Mar 10, 2019

Signed-off-by: Jan N. Klug [email protected]

@J-N-K J-N-K requested a review from a team as a code owner March 10, 2019 09:14
@J-N-K
Copy link
Member Author

J-N-K commented Mar 10, 2019

I can't get the tests running (this is not showing up in Travis since they are disabled).

[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ org.openhab.binding.dmx.tests ---
[INFO] Deleting C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\target
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-java) @ org.openhab.binding.dmx.tests ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ org.openhab.binding.dmx.tests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\main\resources
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ org.openhab.binding.dmx.tests ---
[INFO] No sources to compile
[INFO]
[INFO] --- bnd-maven-plugin:4.1.0:bnd-process (default) @ org.openhab.binding.dmx.tests ---
[WARNING] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\itest.bndrun [0:0]: Unused Import-Package instructions: [org.osgi.framework.*]
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ org.openhab.binding.dmx.tests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ org.openhab.binding.dmx.tests ---
[INFO] Changes detected - recompiling the module!
[INFO] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\test\java\org\openhab\binding\dmx\Lib485BridgeHandlerTest.java:[63,2473] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=@NonNull ThingHandlerCallback'. Declaring type 'Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\test\java\org\openhab\binding\dmx\ChaserThingHandlerTest.java:[195,8659] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=@NonNull ThingHandlerCallback'. Declaring type 'Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\test\java\org\openhab\binding\dmx\ArtnetBridgeHandlerTest.java:[66,2614] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=@NonNull ThingHandlerCallback'. Declaring type 'Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\test\java\org\openhab\binding\dmx\SacnBridgeHandlerTest.java:[66,2650] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=@NonNull ThingHandlerCallback'. Declaring type 'Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\test\java\org\openhab\binding\dmx\AbstractDmxThingTest.java:[60,2174] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=@NonNull ThingHandlerCallback'. Declaring type 'Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\test\java\org\openhab\binding\dmx\AbstractDmxThingTest.java:[73,2835] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=@NonNull ThingHandlerCallback'. Declaring type 'Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\test\java\org\openhab\binding\dmx\multiverse\DmxChannelTest.java:[43,1390] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=@NonNull DimmerThingHandler'. Declaring type 'Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\src\test\java\org\openhab\binding\dmx\DmxBridgeHandlerTest.java:[104,3635] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=@NonNull ThingHandlerCallback'. Declaring type 'Mockito' doesn't seem to be designed with null type annotations in mind
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ org.openhab.binding.dmx.tests ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.openhab.binding.dmx.ArtnetBridgeHandlerTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.432 s - in org.openhab.binding.dmx.ArtnetBridgeHandlerTest
[INFO] Running org.openhab.binding.dmx.ChaserThingHandlerTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 s - in org.openhab.binding.dmx.ChaserThingHandlerTest
[INFO] Running org.openhab.binding.dmx.ColorThingHandlerTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.192 s - in org.openhab.binding.dmx.ColorThingHandlerTest
[INFO] Running org.openhab.binding.dmx.DimmerThingHandlerTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.052 s - in org.openhab.binding.dmx.DimmerThingHandlerTest
[INFO] Running org.openhab.binding.dmx.DmxBridgeHandlerTest
[WARNING] Tests run: 4, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.846 s - in org.openhab.binding.dmx.DmxBridgeHandlerTest
[INFO] Running org.openhab.binding.dmx.internal.FadeActionTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in org.openhab.binding.dmx.internal.FadeActionTest
[INFO] Running org.openhab.binding.dmx.internal.UtilTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.dmx.internal.UtilTest
[INFO] Running org.openhab.binding.dmx.internal.ValueSetTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.dmx.internal.ValueSetTest
[INFO] Running org.openhab.binding.dmx.Lib485BridgeHandlerTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.196 s - in org.openhab.binding.dmx.Lib485BridgeHandlerTest
[INFO] Running org.openhab.binding.dmx.multiverse.BaseChannelTest
[main] WARN org.openhab.binding.dmx.internal.multiverse.BaseDmxChannel - coerced channelId 600 to allowed range 1-512
[main] WARN org.openhab.binding.dmx.internal.multiverse.BaseDmxChannel - coerced channelId -1 to allowed range 1-512
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.494 s - in org.openhab.binding.dmx.multiverse.BaseChannelTest
[INFO] Running org.openhab.binding.dmx.multiverse.DmxChannelTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 s - in org.openhab.binding.dmx.multiverse.DmxChannelTest
[INFO] Running org.openhab.binding.dmx.SacnBridgeHandlerTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.279 s - in org.openhab.binding.dmx.SacnBridgeHandlerTest
[INFO] Running org.openhab.binding.dmx.TunableWhiteThingHandlerTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.085 s - in org.openhab.binding.dmx.TunableWhiteThingHandlerTest
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 54, Failures: 0, Errors: 0, Skipped: 2
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ org.openhab.binding.dmx.tests ---
[INFO] Building jar: C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\target\org.openhab.binding.dmx.tests-2.5.0-SNAPSHOT.jar
[INFO]
[INFO] --- bnd-indexer-maven-plugin:4.1.0:index (index) @ org.openhab.binding.dmx.tests ---
[INFO]
[INFO] --- bnd-indexer-maven-plugin:4.1.0:index (test-index) @ org.openhab.binding.dmx.tests ---
[INFO]
[INFO] --- bnd-testing-maven-plugin:4.1.0:testing (default) @ org.openhab.binding.dmx.tests ---
[INFO] Matching glob *
11:45:40.496 [main] DEBUG org.eclipse.smarthome.core.common.ThreadPoolManager - Created thread pool 'safeCall' with size 5
11:45:40.636 [main] DEBUG org.eclipse.smarthome.core.internal.i18n.I18nProviderImpl - No language set, setting locale to 'null'.
11:45:40.636 [main] DEBUG org.eclipse.smarthome.core.internal.i18n.I18nProviderImpl - Error setting measurement system for value 'null'.
11:45:40.713 [main] DEBUG org.eclipse.smarthome.core.common.ThreadPoolManager - Created scheduled thread pool 'scheduler' of size 5
11:45:40.752 [main] DEBUG org.eclipse.smarthome.core.common.ThreadPoolManager - Created thread pool 'ConfigStatusService' with size 5
11:45:40.761 [main] DEBUG org.eclipse.smarthome.storage.json.internal.JsonStorageService - Json Storage Service: Activated.
11:45:40.763 [main] DEBUG org.eclipse.smarthome.storage.json.internal.JsonStorage - Json storage file at 'C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\target\test\itest\userdata\jsondb\org.eclipse.smarthome.core.items.Metadata.json' does not exist - checking for a backup.
11:45:40.771 [main] DEBUG org.eclipse.smarthome.core.common.registry.AbstractRegistry - Provider "org.eclipse.smarthome.core.internal.items.ManagedMetadataProviderImpl" has been added.
11:45:40.773 [main] DEBUG org.eclipse.smarthome.storage.json.internal.JsonStorage - Json storage file at 'C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\target\test\itest\userdata\jsondb\org.eclipse.smarthome.core.items.Item.json' does not exist - checking for a backup.
11:45:40.773 [main] DEBUG org.eclipse.smarthome.core.common.registry.AbstractRegistry - Provider "org.eclipse.smarthome.core.items.ManagedItemProvider" has been added.
11:45:40.853 [main] DEBUG org.eclipse.smarthome.storage.json.internal.JsonStorage - Json storage file at 'C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\target\test\itest\userdata\jsondb\org.eclipse.smarthome.core.thing.Thing.json' does not exist - checking for a backup.
11:45:40.893 [main] DEBUG org.eclipse.smarthome.core.common.registry.AbstractRegistry - Provider "org.eclipse.smarthome.core.thing.ManagedThingProvider" has been added.
11:45:40.907 [main] DEBUG org.eclipse.smarthome.core.thing.internal.firmware.FirmwareUpdateServiceImpl - Modifying the configuration of the firmware update service.
11:45:40.907 [main] DEBUG org.eclipse.smarthome.core.thing.internal.firmware.FirmwareUpdateServiceImpl - Given time unit null is not supported. Will keep current configuration.
11:45:40.923 [main] DEBUG org.eclipse.smarthome.storage.json.internal.JsonStorage - Json storage file at 'C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\target\test\itest\userdata\jsondb\org.eclipse.smarthome.core.thing.link.ItemChannelLink.json' does not exist - checking for a backup.
11:45:40.924 [main] DEBUG org.eclipse.smarthome.core.common.registry.AbstractRegistry - Provider "org.eclipse.smarthome.core.thing.link.ManagedItemChannelLinkProvider" has been added.
11:45:40.965 [main] DEBUG org.eclipse.smarthome.core.common.registry.AbstractRegistry - Provider "org.eclipse.smarthome.core.thing.internal.ChannelItemProvider" has been added.
11:45:40.983 [main] DEBUG org.eclipse.smarthome.core.common.ThreadPoolManager - Created scheduled thread pool 'thingLinkManager' of size 5
11:45:41.006 [main] DEBUG org.eclipse.smarthome.core.common.ThreadPoolManager - Created scheduled thread pool 'thingManager' of size 5
11:45:41.008 [main] DEBUG org.eclipse.smarthome.storage.json.internal.JsonStorage - Json storage file at 'C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\target\test\itest\userdata\jsondb\thing_status_storage.json' does not exist - checking for a backup.
11:45:41.008 [main] DEBUG org.eclipse.smarthome.core.thing.internal.ThingManagerImpl - Thing handler factory 'DmxHandlerFactory' added
11:45:41.026 [main] DEBUG org.eclipse.smarthome.storage.json.internal.JsonStorage - Json storage file at 'C:\Users\Jan\openhab2-fullide\git\openhab2-addons\itests\org.openhab.binding.dmx.tests\target\test\itest\userdata\jsondb\org.eclipse.smarthome.config.discovery.DiscoveryResult.json' does not exist - checking for a backup.
11:45:41.027 [main] DEBUG org.eclipse.smarthome.core.common.ThreadPoolManager - Created scheduled thread pool 'discovery' of size 5

and then it hangs forever.

CODEOWNERS Outdated Show resolved Hide resolved
@cweitkamp cweitkamp added the infrastructure Build system and Karaf related issues and PRs label Mar 12, 2019
net.bytebuddy.byte-buddy;version='[1.7.9,1.7.10)',\
net.bytebuddy.byte-buddy-agent;version='[1.7.9,1.7.10)',\
org.apache.commons.collections;version='[3.2.1,3.2.2)',\
org.mockito.mockito-core;version='[2.13.0,2.13.1)',\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file will need to be regenerated because of the Mockito upgrade (openhab/openhab-core#647).

@J-N-K
Copy link
Member Author

J-N-K commented Mar 13, 2019

I still have problem getting the tests running. If I use -DwithResolver the build fails with

! could not resolve the bundles: [biz.aQute.tester-4.1.0.201810172157 org.osgi.framework.BundleException: Could not resolve module: biz.aQute.tester [21]
  Unresolved requirement: Import-Package: aQute.bnd.build; version="[3.0.0,4.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: aQute.bnd.osgi; version="[4.1.0,5.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: aQute.bnd.service; version="[4.3.0,5.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: junit.framework; version="[3.8.0,5.0.0)"

]

I I use the itest.bndrun from above, the tests hang.

@maggu2810
Copy link

I will have a look at and come up with a PR to yours...

@maggu2810
Copy link

@J-N-K pure JUnit tests should be placed in src/test/java of the bundle itself. OSGi based Junit tests should be placed in src/main/java of the integration test (test vs. main).
After that change all but one test succeeded.

@maggu2810
Copy link

@J-N-K PR has been created against your branch.

@cweitkamp
Copy link
Contributor

We now have a BOM (bom/openhab-addons/pom.xml) for the add-ons. So it has to be updated for the bundle "groupId" change too.

J-N-K and others added 6 commits March 14, 2019 11:19
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Markus Rathgeb <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
@J-N-K
Copy link
Member Author

J-N-K commented Mar 14, 2019

todo: need to move unit tests

@J-N-K
Copy link
Member Author

J-N-K commented Mar 14, 2019

Travis is happy, Jenkins fails in MQTT, I guess that is unrelated. From my side this is ready.

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks all!

@wborn wborn merged commit 014a24f into openhab:master Mar 14, 2019
@J-N-K J-N-K deleted the bnd-dmx branch March 14, 2019 23:39
@wborn wborn added this to the 2.5 milestone Mar 17, 2019
Pshatsillo pushed a commit to Pshatsillo/openhab-addons that referenced this pull request Jun 19, 2019
Also-by: Markus Rathgeb <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Pshatsillo <[email protected]>
ne0h pushed a commit to ne0h/openhab-addons that referenced this pull request Sep 15, 2019
Also-by: Markus Rathgeb <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Maximilian Hess <[email protected]>
@wborn wborn removed this from the 2.5 milestone Dec 8, 2019
@wborn wborn added this to the 2.5 milestone Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Build system and Karaf related issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants