Test was flaky because the flow can finish below it can be killed,
therefore failing the test. Sleep for 1 minute instead to give plenty of
time for the test.
Do not let a user reattach to a flow started by another user.
Reattaching to a flow using startFlowWithClientId for a flow not
started by the current user throws a PermissionException
Reattaching to a flow using reattachFlowWithClientId for a flow not
started by the current user returns null.
finishedFlowsWithClientIds does not return flows started by other
users.
Normal rpc permissions around startFlowWithClientId and
startFlowDynamicWithClientId has also been added.
To allow admins to remove client ids as well as be able to see all the
client ids on the node, admin versions have been added that bypass the
user restrictions. These can be permitted via rpc to only provide
their usage to admins.
* Make existing client id flows re-attachable via rpc 'startFlow' when flows draining mode is enabled
* Fix detekt issue
* Remove unneeded/ unreached waiting on flow's return future
* Draft version of integrating start flow with client id with reconnecting rpc client
* Add recursive reconnect
* Execute 'doInvoke' on a different thread, fixes hanging
* Tidy up code and add explanatory comment
* Add test timeout
* Add test asserting 'removeClientId' does retry to connect if the node is down
* Modify test to not create a new node on node restart
* Add test asserting 'reattachFlowWithClientId' tries to reconnect if the node is down
* Add test asserting returned flow exception future continue working on node restart
* Add assertions for reconnecting future callbacks
* Remove unused import
* Remove unused local var
* Remove unneeded line breaks
* Remove unneeded parentheses
* Amend existing test; assert flow result reconnectable future returned from 'reattachFlowWithClientId' works
* Update test names
* Add explanatory comment
* Minor comment update
* Fix accidental methods moved
* Update obsolete comment
* INFRA-438 Handle observers not having error handling
When the RPC client connection is closed, it notifies observers using onError(), which may not be the correct approach (TBD) but changing this is a much more invasive change. Where observers do not subscribe to error notifications, this is reflected to the calling client by an exception thrown.
This change catches that exception and lots it as debug rather an error level.
In enterprise, `AuthDBTests` picked up a schema from a unit test and
included it in the cordapp it builds. This schema does not have a
migration and therefore fails the integration tests.
`NodeBasedTest` now lets cordapps to be defined and passed in to avoid
this issue. It defaults to making a cordapp from the tests base
directory if none are provided.
* ENT-5420 stop reconnecting when RejectedCommandException occurs.
* change to store last exception and return quietly
* changed to rethrow exception. Test added
* NOTICK Ignore JUnit time threads in `RPCStabilityTests`
* NOTICK - Ignore ForkJoinPool.commonPool as it's not related to our test
Co-authored-by: LankyDan <danknewton@hotmail.com>
* Remove unused dependencies from test-common
* Explicit imports and formatting
* Add core-test-utils project
* Add dependency
* Move Kryo serialization context to node-api (not serialization as we do not want to pull kryo into the serialization lib)
* Move AMQP server serialization scheme to node api
* Move serialization tests to node-api
* Move internal test helpers without further dependencies.
* Move out some types from RPCClientProxyHandler to node-api in preparation for moving the AMQP scheme
* Move client AMQP context to node-api so we can move the test serialization rule out.
* Move InternalSerializationTestHelpers to core-test-utils
* Moved testing.core to core-test-utils
* Make detekt happy
* Add api-scanner to core-test-utils
* Remove inlined package names introduced by IntelliJ refactoring
* Update api-current.txt to account for reordering.
* Add core-test-utils to list of published artifacts.
* Add missing import
* Location of things in api text has moved again (publish name of artefact?)
* Revert all additions to the API, leaving just the reordering
* Code review: fix up core-test-utils build.gradle and introduce kryo version constant.
* Remove OpenSsl flag from ssl config stub (can't be used from node-api)
* Suppress detekt warning
* Move core test util tests to the right module
* Expose kotlin test as a transient dependency - projects have come to rely on that.
* Fix typo in package name
* [NOTICK] Add a custom detekt rule for tests with no timeout, and fix remaining missing timeouts
* [NOTICK] Add a test for custom detekt rules and tidying
* add timeout annotation to new test
Co-authored-by: Stefano Franz <roastario@gmail.com>
* CORDA-3507: Use the config value for connectionRetryInterval rather than a hardcoded value
* CORDA-3507: Use the config value for connectionRetryInterval rather than a hardcoded value
* CORDA-3513: Don't try to reconnect for PermissionExceptions
* CORDA-3513: Don't try to reconnect for PermissionExceptions
* CORDA-3513: Add test for not reconnecting for PermissionExceptions
* CORDA-3513: Update exception message and test
* CORDA-3464: Also scan attachment:// URLs for custom serializers.
* Only scan the given classloader - ignore this classloader's parents.
* Upgrade to ClassGraph 4.8.58 - for "robustness fixes".
* Register the attachment:// URL scheme using AttachmentsClassLoader.
* Add integration test for custom serializer in contract state.
* Rename Currancy -> Currantsy, just to make the point.