Migrate cds-access-client We have a single test using deprecated methods, migrate it. Change-Id: Ibfbd89c45667e88f9a147ffc791485d87e9147be Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate ActorBehaviorTest to JUnit5 Eliminate the need for mockito-subclass by migrating to JUnit5 and correcting mocking configuration. Change-Id: I3d3a772abe71e0d0576474aa9f2b22cef7fbea0a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump upstreams Adopt: - odlparent-13.0.1 - yangtools-11.0.0-SNAPSHOT - mdsal-12-0.0-SNAPSHOT Since the format of NormalizedNode tree is updated to not include AugmentationNode (and AugmentationIdentifier), we must force an incompatible update, as we do not have enough information to produce compatible payload. Change-Id: Ibf444540ed052b49651ba66ca7b93c806a6c8a97 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove ABIVersion.MAGNESIUM This ABI versions is quite inefficient in its serialization and has been deprecated in the previous release. This patch completes its removal. JIRA: CONTROLLER-2062 Change-Id: I03be0d6561c4db2893e6eb0fd95e3a35e655b76e Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate users of Optional.get() We have an incoming enforcement patch, prepare to adopt it. Change-Id: If73abd4ceaea71a216a4bc3a3968b400b508ec38 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Prune old ABI versions Remove all ABIVersion constants before MAGNESIUM, and adjust the test for that. Also modernize tests a bit. JIRA: CONTROLLER-2060 Change-Id: Ie9e3106e24b0b75d58b360ba2296d85e46be351a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Add new cds-access-api proxies Externalizable serialization format record class hierarchy, which leads to significant overheads. This patch introduces proxies which are are flat, i.e. have java.Object as their superclass, eliminating this overhead. The way we do this is we defined SerialForm interfaces which extend Externalizable and define the serialization protocol in terms of default methods. We then define a bunch of classes which are pure data holders implementing individual SerialForms. Also ensure messages properly implement cloneAsVersion() to propagate the target version, now that it matters for them. Finally audit use of java.io.Serial so that we do not import it -- it is just pure overhead vs. using @java.io.Serial directly. JIRA: CONTROLLER-2051 Change-Id: I01132665027687edc1c6d44dda8a6ab0cab6ad6a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Clean up use of MockitoAnnotations.initMocks Using MockitoAnnotations.initMocks() is deprecated, use JUnitRunner in cds-access-client and sal-clustering-commons. Change-Id: I10b52bfd0a989f722538e3983352c4465f918950 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate Assert.assertThat() This method has been migrated, make sure we use its new place. Change-Id: Ib17471706233150f26a452b8bca36914a95fc8db Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate deprecated testing components org.scalatest.junit.JUnitRunner and org.mockito.Matchers have replacements, migrate to using them. Change-Id: Iff6fa0c937361bb68d4d001feee29af21a430836 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate from YangInstanceIdentifier.EMPTY This migrates to the replacement empty() method. Change-Id: I32ca026a33835edb16f8e1e6142e9192c880076b Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix modernization issues This fixes issues pointed out by Modernizer, which mostly boil down to using Objects.requireNonNull() and direct java.util collections. Change-Id: Id32530a6722cd101f96c23f6a745f91b2f09e2f9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Use OptionalLong in AbstractClientConnection This removes the need for boxing longs. Change-Id: I73a6c0be7f9a662f9e1df884f46adbc0fc121fb1 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Poison entries outside of main lock Poisoning entries may involve reaction from their callbacks, which can attempt to circle back through connections. Make sure we poison them outside of lock context, so that any callbacks end up seeing a poisoned connection, but without the lock being held -- hence the locks can be acquired in-order. JIRA: CONTROLLER-1893 Change-Id: I26551d052307812e76f3e45024a77dbb83312b17 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Improve error reporting for tell-based reads Added contextual info similar to ask-based, including the yang path of the requested read and the backend shard name. Also wrapped RequestTimeoutException with DataStoreUnavailableException. Change-Id: I5487e5531034cc1abbda27a4953897da7212eba8 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Reduce use of scala.concurrent.duration.Duration In most of the places we really are talking about a FiniteDuration, hence use that class directly where it is an internal detail. Aside from providing clarity, this also reduces potential confusion with java.time.Duration. Change-Id: I57d84c5ca058cfc6fa56ce57ebb0c8d4d3864a3a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Integrate MRI projects for Neon This patch bumps: - odlparent to 4.0.2 - yangtools to 2.1.2 - mdsal to 3.0.1 It also deals with: - DOMRpcError.getErrors() changing - java.util.Optional being used in MD-SAL - xmlunit upgrade via xmlunit-legacy - any(Class) not matching nulls - lists disappearing and hence requiring at least one item - remove explicit <null/> in blueprints, as that breaks blueprint-core - adjust sal-binding-it to include byte-buddy, which is a mockito dependency - adjust dependencies to account for ietf-{inet,yang}-types movement - moving to tech.pantheon.triemap - mdsal.common.api removals JIRA: CONTROLLER-1860 Change-Id: I31b2d011015846537a99f963ded1d38e7b29d71e Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate to expectNoMessage() expectNoMsg() has been deprecated, move to its replacement. Change-Id: I51fc5dc28fd8131b76ca00d254de06403e06de69 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove unused exceptions This drops exception declarations which are never used. Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Migrate from JavaTestKit to javadsl.TestKit Remove use of deprecated class and use its 2.5.0 replacement. This leaves a single instance of this class are RaftActorTestKit and ShartTestKit which will need to be migrated in a follow-up patch. Change-Id: I5c112f9984bec3ecf2da530f3505aceb83fa1e05 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>