Commit Graph

9354 Commits

Author SHA1 Message Date
Dan Newton
45fe3f3aef
CORDA-4026 Make early end session test not flakey (#6691) 2020-09-07 16:23:37 +01:00
Yash Nabar
d1735b8c42
EG-3456: Make network parameters path configurable (#6531)
* Update docker image

* EG-3456: Make network parameters path configurable

* EG-3456: Remove filename from network parameters path property

* EG-3456: Add tests for network parameters and node configuration

* Revert docker image update

* EG-3456: Resolve network parameters path against base directory

* EG-3456: Add tests for network parameters path, increase test timeout limits

* EG-3456: Replace baseDirectory argument with networkParametersPath in NetworkParametersReader

* EG-3456: Refactor tests to reuse node configuration object

* EG-3456: Pass networkParametersPath as argument instead of baseDirectory
2020-09-07 09:49:37 +01:00
Ross Nicoll
e069277830
Merge pull request #6689 from corda/rni/notick/46-47-merge-2020-09-04
NOTICK Merge OS 4.6 to 4.7 2020-09-04
2020-09-04 15:52:38 +01:00
Dan Newton
64dc94bd18
ENT-5666 Extract shutdown events when retrying a flow (#6684)
* ENT-5666 Extract shutdown events when retrying a flow

When a flow is retrying, only a select set of events are transferred
over to the new fiber. Shutdown events were not included in this set.

This meant that if a flow retries when an `Event.SoftShutdown` is in its
queue, it will never process it. This causes the node to hang, as the
node awaits `liveFibers`, which never reaches 0 because the shutdown
event is never processed.

To resolve this, `Event.SoftShutdown` is added to the set of events to
extract and reschedule.

* ENT-5666 Don't schedule extra shutdown event

When a flow is stopped by an `Event.SoftShutdown` it will eventually
reschedule another shutdown even when it reaches `SMM.removeFlow`. It
won't actually be processed because the flow returns an abort
continuation. But, it does look odd.

Therefore, it now does nothing instead since that is what it was
implicitly doing.
2020-09-04 15:44:14 +01:00
Ross Nicoll
0c16957622 Merge remote-tracking branch 'origin/release/os/4.6' into rni/notick/46-47-merge-2020-09-04 2020-09-04 14:15:47 +01:00
Rick Parker
e937889b64
Merge pull request #6678 from corda/jzd/merge-os4.6-to-os4.7-2020-09-01
NOTICK: Merge OS 4.6 into OS 4.7
2020-09-04 14:08:25 +01:00
Joseph Zuniga-Daly
02b2b35bc4
CORDA-3908: Update corda-4.7 .ci/api-current.txt to match the previous release (corda-4.6) (#6681)
* CORDA-3908: Update corda-4.7 .ci/api-current.txt to match the previous release (corda-4.6)

* Reapply changes from PR 6644

* NodeParameters gained a property in PR 6644

* Remove duplicate class from bad merge
2020-09-03 17:13:44 +01:00
Jonathan Locke
e562c5828b
INFRA-604: Switch tests to use database snapshots (#6671)
Created a database snapshot of a clean Corda OS 4.5.1 database, which can now be used for testing by both the node driver and mock network.

The MockNetwork was changed from using an in memory database to using an on disk database, and makes use of the snapshot to speed up setup times.

The Node Driver was changed from defaulting to an in-memory database to defaulting to an on-disk database. Tests that do not specify the type of database to use will thus use an on-disk database. Tests that opt in for an in-memory database will continue to use an in-memory database as before.

The database snapshots are copied to the node directory inside the build folder, therefore, they should be cleaned up after a build.

Co-authored-by: Ross Nicoll <ross.nicoll@r3.com>
2020-09-03 14:43:55 +01:00
Christian Sailer
4b84182ab0
NOTICK Make the projects under common not depend on anything Corda. (#6675) 2020-09-03 10:45:35 +01:00
conalsmith-r3
3ce78b813d
EG-3458 - Missing onError implementation message logged in the node l… (#6602)
* EG-3458 - Missing onError implementation message logged in the node log file with ERROR level - the changes made on top of 4.6 branch

* EG-3458 - Reducing the number of logs by only logging on first consecutive error. Retry without completing the observable

* EG-3458 - Refactor the overly complex method to smaller functions

* EG-3458 - Reducing the number of functions in the class
2020-09-02 15:21:48 +01:00
Adel El-Beik
9962c9085d
INFRA-424: Merge openj9 updates into 4.6 (#6683)
* INFRA-424 linux1 jenkinsfile

* INFRA-424 full run

* INFRA-424 bigger heap size

* Upgraded DJVM to handle BC - latest version of BC is a multirelease JAR.
When reading JKS keystore if a BC EdDSAPrivateKey is returned then swap for a net.i2p EdDSA private key.

* Temporary downgrade of BC

* Removed the BC EdDSA conversion

* INFRA-424 bigger heap size

* Upgrading Quasar to handle openJ9 different fields.

* INFRA-424: Handle lack of SUPPRESSED_SENTINEL in openj9.

* INFRA-424: If BCEdDSA public or private key is generated convert to net.i2p EdDSA form.

* INFRA-424 bigger heap size

* INFRA-424: On openJ9 only getting upto milli resolution.

* INFRA-424: Handle keystore returning a BCEdDSAPrivateKey.

* INFRA-424: Disable test on JDK11, as it requires the custom cordapp to generate JDK8 contract code, which we now check for.

* INFRA-424: Truncated time test to resolution of millis for openj9.

* INFRA-424 disabling log intensive tests until a fix is developed

* INFRA-424 one more test disabled

* INFRA-424: Disabled a couple of tests failing on openj9.

* INFRA-424: Disabling failing openj9 tests.

* INFRA-424: Disabling test failing on openj9.

* INFRA-424: Ignoring another flaky sleep test on openj9.

* INFRA-424 run integrationTests

* INFRA-424 set timeout to 4 hours

* INFRA-424: Cope with exception message from openj9.

* INFRA-424: Handle the coloured text characters openj9 adds.

* INFRA-424: Disabling test as it is generating JDK11 contract code under JDK11. Currently on JDK8 contract code allowed.

* INFRA-424: Commenting test out for openj9. Output of the processs thats read by the test is sometimes garbled.

* INFRA-424 switching to smoke tests

* INFRA-424 switching to slow integration tests

* INFRA-424 full run

* INFRA-424 moving jenkinsfile

* INFRA-424 removing references

* INFRA-424: Created common IS_OPENJ9 func for ignoring tests.

Co-authored-by: Schife <razvan.codreanu@r3.com>
2020-09-02 14:35:30 +01:00
Nikolett Nagy
6113cbbd39
verify with NETWORK_PARAMETERS role and test (#6628) 2020-09-02 09:48:01 +01:00
Ross Nicoll
b1e2d6a48c
NOTICK Reformat DriverDSLImpl.kt (#6685)
Reformat DriverDSLImpl to standard IntelliJ style
2020-09-01 19:40:39 +01:00
Ross Nicoll
b895a976a7
Merge pull request #6682 from corda/rni/notick/os-45-46-docs-db
NOTICK Merge OS 4.5 to 4.6
2020-09-01 17:47:54 +01:00
Ross Nicoll
d928c29019 Merge remote-tracking branch 'origin/release/os/4.5' into rni/notick/os-45-46-docs-db 2020-09-01 17:00:00 +01:00
Ross Nicoll
aaff9ce650
Merge pull request #6679 from corda/rni/notick/os-44-45-db
NOTICK Merge OS 4.4 to 4.5
2020-09-01 16:53:48 +01:00
Ross Nicoll
aa1b74d510 Merge remote-tracking branch 'origin/release/os/4.4' into rni/notick/os-44-45-db 2020-09-01 16:06:03 +01:00
Ross Nicoll
6945426ef1
NOTICK Robustness improvements for DB race condition test (#6556) (#6677)
Switch away from log monitoring to verify that DB race conditions are reported correctly, in an attempt to resolve a test instability issue.
2020-09-01 16:04:12 +01:00
Joseph Zuniga-Daly
eecc294820 Merge OS 4.6 OS 4.7
Conflicts:
- .ci/api-current.txt - Kept existing version on 4.7 as I'm about to regenerate the file
2020-09-01 15:28:37 +01:00
Ross Nicoll
0133ada0ac
NOTICK Robustness improvements for DB race condition test (#6556) (#6676)
Switch away from log monitoring to verify that DB race conditions are reported correctly, in an attempt to resolve a test instability issue.
2020-09-01 14:05:36 +01:00
Dan Newton
a64a3bd02d
Merge pull request #6665 from corda/jzd/merge-os4.6-to-os4.7-2020-08-26
NOTICK: Merge OS 4.6 into OS 4.7
2020-09-01 13:23:43 +01:00
Adel El-Beik
14e23430c0
CORDA-4003: Now support + in CorDapp filenames (#6673)
* CORDA-4003: Now cope with file: prefix not being in class path element.

* CORDA-4003: Switched to new URL type filter.

* CORDA-4003: Switched to a URL comparison. In the string comparison the scheme was removed in latest version of classgraph.

* CORDA-4003: Moved to latest version of classgraph that has support for + in filenames.

* CORDA-4003: Switched to accept version of the deprecated classgraph methods.
2020-09-01 10:30:49 +01:00
Kyriakos Tharrouniatis
90ab495798
NOTICK - Fix concurrency issue in flaky test (#6674)
* Fix concurrency issue in test; should be fixing flaky test
* Replace 'incrementAndGet' occurences with 'getAndIncrement'
2020-08-28 12:48:20 +01:00
Dries Samyn
d08b62da39
Infra-656 - NoSuchFileException in NodeInfoWatcher fix (#6672)
* Filter out tmp files

* Ignore .tmp files

* Ignore .tmp files

* Remove unused import
2020-08-27 16:41:25 +01:00
David Golding
9a018e7bee
Updated CLI usage error (#6661) 2020-08-27 12:15:21 +01:00
Dries Samyn
0cfe6b3084
Filter out tmp files (#6668) 2020-08-27 08:48:08 +01:00
Joseph Zuniga-Daly
3890064095
CORDA-3908: Update corda-4.6 .ci/api-current.txt to match the previous release (corda-4.5) (#6504)
* CORDA-3908: Update corda-4.6 .ci/api-current.txt to match the previous release (corda-4.5)

* Reapply changes from PR 6392

* Apply change introduced by PR #6326

* Apply change introduced by PR #6280
2020-08-26 17:41:18 +01:00
Adel El-Beik
9629ff6ba2
CORDA-4009: Upgrade DJVM to 1.1.1 to support the new multi release BC JAR. (#6664) 2020-08-26 13:59:17 +01:00
Joseph Zuniga-Daly
8fd4fd1bf8 Merge OS 4.6 into OS 4.7 2020-08-26 11:09:02 +01:00
Rick Parker
0a290a73f4
Merge pull request #6662 from corda/jzd/merge-os4.5-to-os4.6-2020-08-25
NOTICK: Merge OS 4.5 into OS 4.6
2020-08-26 09:59:55 +01:00
Joseph Zuniga-Daly
797ecf3b7c Don't change api-current because we are about to regenerate it 2020-08-25 12:00:37 +01:00
Joseph Zuniga-Daly
2a09dd066d Merge OS 4.5 into OS 4.6 2020-08-25 11:57:54 +01:00
Dan Newton
99f835bb4a
CORDA-3995 Redeliver external events if number of suspends differs (#6646)
* CORDA-3995 Redeliver external events in number of suspends differs

When retrying a flow, only redeliver external events held in a flow's
pending deduplication handlers if there is a difference in the
`numberOfSuspends` on the `currentState`'s checkpoint or the checkpoint
in the database.

If the checkpoint committed, but the flow retried, then the external
events would have been persisted to the database as part of the same
transaction. Therefore there is no need to replay them, as they have
already been processed as saved as part of the checkpoint.

This change is only relevant when the checkpoint persists, but the flow
still needs to retry after this occurs (within the same
transition/event).

* CORDA-3995 Redeliver external events in number of commits differs

When retrying a flow, only redeliver external events held in a flow's
pending deduplication handlers if there is a difference in the
`numberOfCommits` on the `currentState`'s checkpoint or the checkpoint
in the database.

If the checkpoint committed, but the flow retried, then the external
events would have been persisted to the database as part of the same
transaction. Therefore there is no need to replay them, as they have
already been processed as saved as part of the checkpoint.

This change is only relevant when the checkpoint persists, but the flow
still needs to retry after this occurs (within the same
transition/event).

* CORDA-3995 Redeliver external events if number of commits differs

When retrying a flow, only redeliver external events held in a flow's
pending deduplication handlers if there is a difference in the
`currentState`'s `numberOfCommits` or the `numberOfCommits`
the checkpoint has recorded in the database.

If the checkpoint committed, but the flow retried, then the external
events would have been persisted to the database as part of the same
transaction. Therefore there is no need to replay them, as they have
already been processed as saved as part of the checkpoint.

This change is only relevant when the checkpoint persists, but the flow
still needs to retry after this occurs (within the same
transition/event).

* Add @Suspendable to a test flow.

I am surprised this worked at all.

* Fix a few minor things based on review.

Co-authored-by: Will Vigor <william.vigor@r3.com>
2020-08-25 11:54:55 +01:00
Rick Parker
7a7289c2f1
Merge pull request #6660 from corda/jzd/merge-os4.4-to-os4.5-2020-08-24
Merge OS 4.4 into OS 4.5
2020-08-25 10:59:27 +01:00
Walter Oggioni
49f598308b
added checkpoints debug shell command (#6574) 2020-08-25 10:10:25 +01:00
Matthew Nesbit
57f4858a29
Merge pull request #6638 from corda/nnagy-os-4.6-os-4.7-20200814
NOTICK - OS 4.6 to OS 4.7 merge 20200814
2020-08-24 15:30:39 +01:00
Joseph Zuniga-Daly
df7e3ca184
CORDA-3908: Update corda-4.5 .ci/api-current.txt to match the previous release (corda-4.4) (#6648)
* CORDA-3908: Update corda-4.5 .ci/api-current.txt to match the previous release (corda-4.4)

* Reapply changes from PR 5998
https://github.com/corda/corda/pull/5998
2020-08-24 14:32:10 +01:00
Joseph Zuniga-Daly
33943032fb Merge OS 4.4 into OS 4.5 2020-08-24 13:48:55 +01:00
William Vigor
133e6fe39a
CORDA-4001 Verify Paused Checkpoints on Node Startup (#6655)
We should check that PAUSED Checkpoints can be deserialised on node
startup as we do for RUNNABLE checkpoints. Otherwise a user might
get into trouble if they update the CorDapp.
2020-08-24 12:59:51 +01:00
Anurag Garg
e243e9b315
Merge pull request #6653 from corda/filipeoliveira/eg-3402
EG-3402 - Fixed an issue in the irs-demo project that would make builds to always fail
2020-08-21 11:53:59 +01:00
Razvan Codreanu
b2cb0cc51a
INFRA-608 Split out regression test stage (#6619)
Split out regression test stage to reduce fragility
2020-08-21 11:18:54 +01:00
filipesoliveira
d8eb117104 Fixed an issue caused by the irs-demo project that would prevent builds from succeed.
Build command that would fail every time: “./gradlew clean build slowIntegrationTest”.

Notes:
The evaluationDependsOn lines inside the build.gradle file under the irs-demo folder where moved above the dependencies for best practices and to avoid weird errors.

The archiveClassifier added to the build.gradle file under irs-demo/web folder is the actual fix. The archive classifier accepts a string that is appended to the jar file. By changing the filename of the jar, Boot Spring is prevented from overwriting the jar and causing build issues.
2020-08-20 16:46:41 +01:00
Rick Parker
509bce9942
Merge pull request #6651 from corda/jzd/merge-os4.3-to-os4.4-2020-08-19
NOTICK: Merge OS 4.3 into OS 4.4
2020-08-20 14:59:42 +01:00
Dan Newton
39491e8835
NOTICK - Fix flow framework tests (#6650)
Clear hooks between tests.
2020-08-20 11:20:35 +01:00
Nikolett Nagy
ab21833390
Re-add lost fix (#6652) 2020-08-20 09:23:03 +01:00
Kyriakos Tharrouniatis
f428836f33 Clear hospital hooks after tests; should be fixing tests hanging 2020-08-20 09:22:56 +01:00
nikinagy
8b900c7c08 Re-add lost fix 2020-08-19 18:57:39 +01:00
Joseph Zuniga-Daly
6a776a267b Extract method to fix detekt ComplexMethod failure 2020-08-19 17:18:39 +01:00
Joseph Zuniga-Daly
e79f4ab8e2 Merge OS 4.3 into OS 4.4
Conflicts:
- .ci/dev/pr-code-checks/Jenkinsfile - Kept 4.4 version
- constants.properties - Took highest version library
- serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt - Manually merged code changes
2020-08-19 16:38:23 +01:00
Kyriakos Tharrouniatis
5d24b70227
CORDA-3998 - Commit db transaction before starting flows at node start (#6647)
Delay the firing of future/callback chain in 'AbstractNode.start' to after db transaction commit
2020-08-19 15:56:12 +01:00