From 5f074e3c980aa2d65b2c71e57eb759e805b7d4d5 Mon Sep 17 00:00:00 2001 From: Holger Friedrich Date: Mon, 29 Dec 2025 08:33:11 +0100 Subject: [PATCH] Remove JUnit @Execuion annotations Remove @Execution annotations where JUnit default SAME_THREAD is used. Signed-off-by: Holger Friedrich --- .../openhab/core/ui/internal/items/ItemUIRegistryImplTest.java | 3 --- .../core/internal/items/ItemStateConverterImplTest.java | 3 --- .../java/org/openhab/core/library/types/DateTimeTypeTest.java | 3 --- .../java/org/openhab/core/library/types/DecimalTypeTest.java | 3 --- .../java/org/openhab/core/library/types/PercentTypeTest.java | 3 --- .../library/types/QuantityTypeArithmeticGroupFunctionTest.java | 3 --- .../java/org/openhab/core/library/types/QuantityTypeTest.java | 3 --- .../automation/integration/test/HostFragmentSupportTest.java | 3 --- 8 files changed, 24 deletions(-) diff --git a/bundles/org.openhab.core.ui/src/test/java/org/openhab/core/ui/internal/items/ItemUIRegistryImplTest.java b/bundles/org.openhab.core.ui/src/test/java/org/openhab/core/ui/internal/items/ItemUIRegistryImplTest.java index a01ffb51b..97765561d 100644 --- a/bundles/org.openhab.core.ui/src/test/java/org/openhab/core/ui/internal/items/ItemUIRegistryImplTest.java +++ b/bundles/org.openhab.core.ui/src/test/java/org/openhab/core/ui/internal/items/ItemUIRegistryImplTest.java @@ -36,8 +36,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; @@ -101,7 +99,6 @@ import org.openhab.core.ui.items.ItemUIRegistry.WidgetLabelSource; @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) @NonNullByDefault -@Execution(ExecutionMode.SAME_THREAD) public class ItemUIRegistryImplTest { @Nullable diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/internal/items/ItemStateConverterImplTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/internal/items/ItemStateConverterImplTest.java index 2e9af98c5..77624fd9d 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/internal/items/ItemStateConverterImplTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/internal/items/ItemStateConverterImplTest.java @@ -28,8 +28,6 @@ import org.eclipse.jdt.annotation.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.openhab.core.i18n.UnitProvider; @@ -49,7 +47,6 @@ import org.openhab.core.types.UnDefType; * @author Henning Treu - Initial contribution */ @NonNullByDefault -@Execution(ExecutionMode.SAME_THREAD) public class ItemStateConverterImplTest { @Nullable diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/DateTimeTypeTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/DateTimeTypeTest.java index 11423af9c..2c12021d3 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/DateTimeTypeTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/DateTimeTypeTest.java @@ -38,8 +38,6 @@ import org.eclipse.jdt.annotation.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -53,7 +51,6 @@ import org.junit.jupiter.params.provider.ValueSource; * @author Gaƫl L'hopital - added ability to use second and milliseconds unix time */ @NonNullByDefault -@Execution(ExecutionMode.SAME_THREAD) public class DateTimeTypeTest { @Nullable diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/DecimalTypeTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/DecimalTypeTest.java index 47babd74e..f8ae117b2 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/DecimalTypeTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/DecimalTypeTest.java @@ -27,8 +27,6 @@ import org.eclipse.jdt.annotation.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -40,7 +38,6 @@ import org.openhab.core.library.unit.Units; * @author Stefan Triller - more tests for type conversions */ @NonNullByDefault -@Execution(ExecutionMode.SAME_THREAD) public class DecimalTypeTest { @Nullable diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/PercentTypeTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/PercentTypeTest.java index ffbb2135a..2f10fbb5b 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/PercentTypeTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/PercentTypeTest.java @@ -23,8 +23,6 @@ import org.eclipse.jdt.annotation.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; @@ -34,7 +32,6 @@ import org.openhab.core.library.unit.Units; * @author Kai Kreuzer - Initial contribution */ @NonNullByDefault -@Execution(ExecutionMode.SAME_THREAD) public class PercentTypeTest { @Nullable diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeArithmeticGroupFunctionTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeArithmeticGroupFunctionTest.java index 177065f9f..2c3e0960c 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeArithmeticGroupFunctionTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeArithmeticGroupFunctionTest.java @@ -37,8 +37,6 @@ import org.eclipse.jdt.annotation.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -63,7 +61,6 @@ import org.osgi.service.component.ComponentContext; */ @ExtendWith(MockitoExtension.class) @NonNullByDefault -@Execution(ExecutionMode.SAME_THREAD) public class QuantityTypeArithmeticGroupFunctionTest { @Nullable diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeTest.java index 37bee4abf..aa6e2d95d 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeTest.java @@ -37,8 +37,6 @@ import org.eclipse.jdt.annotation.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.openhab.core.library.dimension.DataAmount; @@ -59,7 +57,6 @@ import tech.units.indriya.unit.UnitDimension; */ @SuppressWarnings("null") @NonNullByDefault -@Execution(ExecutionMode.SAME_THREAD) public class QuantityTypeTest { @Nullable diff --git a/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/HostFragmentSupportTest.java b/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/HostFragmentSupportTest.java index 7d1e62291..b54eda460 100644 --- a/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/HostFragmentSupportTest.java +++ b/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/HostFragmentSupportTest.java @@ -27,8 +27,6 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import org.openhab.core.automation.type.ModuleType; import org.openhab.core.automation.type.ModuleTypeRegistry; import org.openhab.core.storage.StorageService; @@ -49,7 +47,6 @@ import org.slf4j.LoggerFactory; */ @SuppressWarnings("deprecation") @NonNullByDefault -@Execution(ExecutionMode.SAME_THREAD) public class HostFragmentSupportTest extends JavaOSGiTest { private static final Locale BULGARIAN = Locale.of("bg");