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

Migrate to JUnit 5 tests #1358

Merged
merged 36 commits into from
Jan 3, 2025

Conversation

system24seven
Copy link

@system24seven system24seven commented Jan 1, 2025

All tests are changed to match JUnit 5, and all testNG references are removed.
Two tests are failing for unknown reasons, @kevinherron you were last working on the BinaryDecoderTest.testEnumArray and CertificateValidationUtilTest.testBuildAndValidate_LeafIntermediateSigned_Revoked from what I can see.

Before you submit a pull request please acknowledge the following:

  • You have signed an Eclipse Contributor Agreement and are committing using the same email address
  • Your code contains any tests relevant to the problem you are solving
  • All new and existing tests passed
  • Code follows the style guidelines and Checkstyle passes

See CONTRIBUTING for more information.

eclipse-milo-bot and others added 21 commits January 31, 2024 18:32
Signed-off-by: Aurélien Pupier <apupier@redhat.com>
Signed-off-by: Aurélien Pupier <apupier@redhat.com>
Signed-off-by: Aurélien Pupier <apupier@redhat.com>
Signed-off-by: system24seven <david@system24seven.com>
Signed-off-by: system24seven <david@system24seven.com>
# Conflicts:
#	README.md
#	build-tools/pom.xml
#	milo-examples/client-examples/pom.xml
#	milo-examples/pom.xml
#	milo-examples/server-examples/pom.xml
#	opc-ua-sdk/dictionary-manager/pom.xml
#	opc-ua-sdk/dictionary-reader/pom.xml
#	opc-ua-sdk/dictionary-reader/src/test/java/org/eclipse/milo/opcua/sdk/client/dtd/DataTypeDictionaryReaderTest.java
#	opc-ua-sdk/integration-tests/pom.xml
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/AddressSpaceTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/UaNodeTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/UaObjectNodeTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/UaVariableNodeTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/methods/UaMethodTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/subscriptions/AbstractManagedItemTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/subscriptions/BatchModifyMonitoredItemsTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/subscriptions/BatchSetMonitoringModeTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/subscriptions/ManagedDataItemTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/subscriptions/ManagedEventItemTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/subscriptions/ManagedSubscriptionTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/core/DataTypeTreeTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/server/api/methods/AbstractMethodInvocationHandlerTest.java
#	opc-ua-sdk/integration-tests/src/test/java/org/eclipse/milo/opcua/sdk/server/api/util/AttributeWriterTest.java
#	opc-ua-sdk/pom.xml
#	opc-ua-sdk/sdk-client/pom.xml
#	opc-ua-sdk/sdk-core/pom.xml
#	opc-ua-sdk/sdk-core/src/test/java/org/eclipse/milo/opcua/sdk/server/util/GroupMapCollateTest.java
#	opc-ua-sdk/sdk-server/pom.xml
#	opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/util/AttributeWriter.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/core/AccessLevelTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/core/CefactEngineeringUnitsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/core/NumericRangeTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/core/ReferenceTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/LifecycleManagerTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/api/config/OpcUaServerConfigTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/AbstractConversionTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteStringConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DateTimeConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/LocalizedTextConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversionsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/EqualsTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/IsNullTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/nodes/UaNodeTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/nodes/delegates/AttributeDelegateChainTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/nodes/factories/InstanceDeclarationHierarchyTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/nodes/factories/NodeFactoryTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/nodes/filters/AttributeFilterChainTest.java
#	opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/util/HostnameUtilTest.java
#	opc-ua-sdk/sdk-tests/pom.xml
#	opc-ua-sdk/sdk-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/api/identity/AnonymousProviderTest.java
#	opc-ua-sdk/sdk-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/config/OpcUaClientConfigTest.java
#	opc-ua-sdk/sdk-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/session/SessionFsmTest.java
#	opc-ua-sdk/sdk-tests/src/test/java/org/eclipse/milo/opcua/sdk/client/subscriptions/ClientHandleSequenceTest.java
#	opc-ua-stack/bsd-core/pom.xml
#	opc-ua-stack/bsd-generator/pom.xml
#	opc-ua-stack/bsd-parser-gson/pom.xml
#	opc-ua-stack/bsd-parser-gson/src/test/java/org/eclipse/milo/opcua/binaryschema/gson/JsonBsdParserTest.java
#	opc-ua-stack/bsd-parser/pom.xml
#	opc-ua-stack/bsd-parser/src/test/java/org/eclipse/milo/opcua/binaryschema/BsdParserTest.java
#	opc-ua-stack/bsd-parser/src/test/java/org/eclipse/milo/opcua/binaryschema/GenericBsdParserTest.java
#	opc-ua-stack/pom.xml
#	opc-ua-stack/stack-client/pom.xml
#	opc-ua-stack/stack-core/pom.xml
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/SequenceHeaderTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/SerializationFixture2.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/SymmetricSecurityHeaderTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/AttributeIdTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/channel/messages/HelloMessageTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/security/DefaultCertificateManagerTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/security/DefaultTrustListManagerTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/OpcUaBinaryStreamDecoderTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/OpcUaXmlStreamDecoderTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/BinaryDecoderTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/BinarySerializationFixture.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/DataValueSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/DiagnosticInfoSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/ExpandedNodeIdSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/ExtensionObjectSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/GuidSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/LocalizedTextSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/NodeIdSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/OpcUaBinaryStreamEncoderTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/StringSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/VariantSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/binary/XmlElementSerializationTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/ByteStringTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/DateTimeTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExpandedNodeIdTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeIdTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/QualifiedNameTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/VariantTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/structured/ApplicationDescriptionTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/ArrayUtilTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/CertificateUtilTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/EndpointUtilTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/ExecutionQueueTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/LazyTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/NonceUtilTest.java
#	opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/validation/CertificateValidationUtilTest.java
#	opc-ua-stack/stack-server/pom.xml
#	opc-ua-stack/stack-tests/pom.xml
#	opc-ua-stack/stack-tests/src/test/java/org/eclipse/milo/opcua/stack/ChunkSerializationTest.java
#	opc-ua-stack/stack-tests/src/test/java/org/eclipse/milo/opcua/stack/ClientCertificateValidatorIT.java
#	opc-ua-stack/stack-tests/src/test/java/org/eclipse/milo/opcua/stack/ClientServerTest.java
#	opc-ua-stack/stack-tests/src/test/java/org/eclipse/milo/opcua/stack/SecurityFixture.java
#	opc-ua-stack/stack-tests/src/test/java/org/eclipse/milo/opcua/stack/StackIntegrationTest.java
#	opc-ua-stack/stack-tests/src/test/java/org/eclipse/milo/opcua/stack/client/config/UaStackClientConfigTest.java
#	opc-ua-stack/stack-tests/src/test/java/org/eclipse/milo/opcua/stack/server/EndpointConfigurationTest.java
#	pom.xml
Signed-off-by: system24seven <david@system24seven.com>
Signed-off-by: system24seven <david@system24seven.com>
@eclipse-milo-bot
Copy link
Contributor

Can one of the admins verify this patch?

@kevinherron
Copy link
Contributor

Thank you. I fixed some formatting and broken tests, but there's still more to fix. I'll work on this a bit today.

@kevinherron
Copy link
Contributor

This still needs another review pass, I think there's still a lot of "expected" vs "actual" parameters being passed to the assertions in the wrong position.

@kevinherron kevinherron self-requested a review January 1, 2025 17:12
Signed-off-by: system24seven <david@system24seven.com>
Signed-off-by: system24seven <david@system24seven.com>
Signed-off-by: system24seven <david@system24seven.com>
Signed-off-by: system24seven <david@system24seven.com>
@system24seven
Copy link
Author

I am pretty sure I have got the assertions correct, there are a couple where you are comparing two expected values that I have left alone.

@kevinherron kevinherron merged commit 82fc1ba into eclipse-milo:dev/1.0 Jan 3, 2025
3 checks passed
@system24seven system24seven deleted the migrateToJunitTest branch January 3, 2025 23:02
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

Successfully merging this pull request may close these issues.

4 participants