2789 Commits

Author SHA1 Message Date
Shams Asari
02fae5f385 Merge remote-tracking branch 'open/master' into os-merge-757181e
# Conflicts:
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/CordaPersistence.kt
#	node/src/integration-test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTest.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/internal/Node.kt
#	node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt
#	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
#	node/src/test/kotlin/net/corda/node/internal/NodeTest.kt
#	node/src/test/kotlin/net/corda/node/services/identity/PersistentIdentityServiceTests.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/InternalMockNetwork.kt
2018-07-24 17:04:51 +01:00
Shams Asari
d4f0e0f8e0
Ordered starting of node components and clear dependencies between them (#3664)
Moved start up logic of the various node components out of their c’tors and into “start” methods, which are called from Node.start(). The components themselves are created in the Node’s c’tor with minimal initialisation logic.

Certain things are not immediately available at construction time, which are instead given to the components at start time in an orderly fashion:

* Certs from the node’s key store and trust store
* The network parameters, and thus access to things like maxMessageSize and the contracts whitelist
* A running database - several components were doing database stuff their c’tors
* The node’s NodeInfo, and thus access to things like identities and addresses

The messaging service couldn’t be created in the Node’s c’tor due to initialisation issues with MockNode. This should be fixed in a later commit.
2018-07-24 16:13:21 +01:00
Anthony Keenan
f4b778667d Fix AbstractNode imports 2018-07-24 11:43:07 +01:00
Anthony Keenan
4708c62de4 Merge remote-tracking branch 'open/master' into os-merge-20180724
# Conflicts:
#	CONTRIBUTORS.md
#	docs/source/contributing.rst
#	docs/source/corda-configuration-file.rst
#	docs/source/index.rst
#	node/src/integration-test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTest.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	settings.gradle
2018-07-24 11:33:21 +01:00
Michele Sollecito
824651d677 Fixed a compilation error. 2018-07-23 19:35:13 +01:00
Michele Sollecito
f142e491cc Fixed a compilation error. 2018-07-23 16:58:12 +01:00
Michele Sollecito
32299a0811 Fixed a compilation error. 2018-07-23 16:48:34 +01:00
Michele Sollecito
a4d65dae22 Merge remote-tracking branch 'remotes/open/master' into merges/july-23-11-26
# Conflicts:
#	confidential-identities/src/test/kotlin/net/corda/confidential/IdentitySyncFlowTests.kt
#	docs/source/changelog.rst
#	node/src/integration-test/kotlin/net/corda/node/NodePerformanceTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/AttachmentLoadingTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/BFTNotaryServiceTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/BFTSMaRtTests.kt
#	node/src/main/kotlin/net/corda/node/internal/Node.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/ManifestUtils.kt
#	node/src/test/kotlin/net/corda/node/CordaRPCOpsImplTest.kt
#	node/src/test/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoaderTest.kt
#	node/src/test/kotlin/net/corda/node/messaging/TwoPartyTradeFlowTests.kt
#	node/src/test/kotlin/net/corda/node/services/TimedFlowTests.kt
#	settings.gradle
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/NodeBasedTest.kt
2018-07-23 15:22:39 +01:00
Shams Asari
a0183fbdfd
Removed PersistentNetworkMapCache.start() (#3661)
The loading of all node infos in the start method was unnecessary, both for the changePublisher and _loadDBSuccess, and the setting of _registrationFuture was incorrect.
2018-07-23 14:01:14 +01:00
Michele Sollecito
abc1d99eaa
[CORDA-1799]: Avoid generating test CorDapp JARs from each out of process node started by the driver (#3641) 2018-07-23 11:18:11 +01:00
szymonsztuka
5db90af332
Fix integration test to run in database mode (#1289)
Ensure ArtemisMessagingTest and  RaftTransactionCommitLogTests use H2 when running in remote database mode.
2018-07-23 10:34:59 +01:00
Anthony Keenan
168664f7a8 Merge remote-tracking branch 'open/master' into os-merge-20180722
# Conflicts:
#	CONTRIBUTORS.md
#	constants.properties
#	docs/source/aws-vm-explore.rst
#	docs/source/azure-vm-explore.rst
#	docs/source/corda-networks-index.rst
#	docs/source/gcp-vm.rst
#	docs/source/getting-set-up.rst
#	docs/source/node-database.rst
#	finance/src/main/kotlin/net/corda/finance/contracts/asset/cash/selection/CashSelectionSQLServerImpl.kt
#	finance/src/main/resources/META-INF/services/net.corda.finance.contracts.asset.cash.selection.AbstractCashSelection
#	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
#	node/src/test/kotlin/net/corda/node/services/config/NodeConfigurationImplTest.kt
2018-07-22 23:06:43 +01:00
Anthony Keenan
7853cfe003
[CORDA-1482] Make boolean config variables case insensitive (#3622)
* Make boolean config variables case insensitive

* Address review comments
2018-07-21 11:54:02 +01:00
cxyzhang0
d2446be69e MSSQL support (#3382)
* MSSQL support

* changes per reviewer's comments; doc

* clean up

* CONTRIBUTORS.md

* minor change in comment

* another minor change in comment

* minor formatting

* Comments formatting per recommend style; contributors in alphabet order

* more comment formatting per coding style

* Change MSSQL to SQLServer in codes and comments

* Change MSSQL to SQLServer in doc

* Use generateSequence to build repeats of ?,?,...?
2018-07-20 16:25:15 +01:00
Shams Asari
365c1e6ad2 Revert "Remove non-compiling tests"
This reverts commit 935c4d2. To make the test compile two internal fields in node where made public. It seems that the "internal" modifier does not see integration tests as part of the same module.
2018-07-20 14:34:09 +01:00
Michele Sollecito
fae30c8703
Merge pull request #1285 from corda/2018-07-19
OS merge 2018-07-19
2018-07-20 14:12:57 +01:00
szymonsztuka
6e91fcbb32
Enable new test to run in remote database mode - add SQL setup, add finance packages to create tables by Liquidate. (#1284) 2018-07-20 14:09:58 +01:00
Dominic Fox
7217a27b28 Allocate ports in a non-deprecated way 2018-07-20 11:38:33 +01:00
Dominic Fox
935c4d2863 Remove non-compiling tests 2018-07-20 11:04:02 +01:00
Dominic Fox
62c2e1c892 OS merge 2018-07-19 2018-07-19 16:43:46 +01:00
Florian Friemel
7466463b89
[CORDA-1572] Create marker file to track initial registration status. (#3621)
[CORDA-1572] Create marker file to track initial registration status.
2018-07-19 16:20:04 +01:00
bpaunescu
53b398a460
ENT-2116: handle amqp client remote error, added test (#3636)
* ENT-2116: handle amqp client remote error, added test

* ENT: 2116 rename test, added logging

* ENT-2116: rename test to indicate its purpose
2018-07-18 16:07:42 +01:00
Chris Rankin
1b05ccd397
Merge pull request #1280 from corda/chrisr3-os-merge
Merge up to e879de70f306af30a80ecbd125dab799aeeaf268.
2018-07-18 15:35:54 +01:00
Viktor Kolomeyko
8c103d4247
ENT-2261: Systematic integration test for FlowProcessing (#1278)
* ENT-2261: Skeleton of parameterized test.

* ENT-2261: Programmatically compose rules and install them.

* ENT-2261: Separate counter decrement from termination.

* ENT-2261: Extend coverage to "executePersistCheckpoint".

* ENT-2261: Extend coverage to "ClientMessageImpl.acknowledge()"

* ENT-2261: Extend coverage to "RPCServer.context()"

* ENT-2261: Extend coverage to "ActionExecutorImpl.executeReleaseSoftLocks()" (unfinished)

* ENT-2261: Re-structure test data slightly.
"executeReleaseSoftLocks" seems to be failing.

* ENT-2261: Correct expectations in terms of number of transactions that ought to be produced.

Also use "eventually" construct to cater for node restart which may take some time.

* ENT-2261: Incorporate feedback from @exFalso and use polling approach.

* ENT-2261: Additional debug output.

* ENT-2261: Further expand coverage to RPCServer.context()

Also tighten-up assertion checks.

* ENT-2261: Further expand coverage to ActionExecutorImpl.executeCreateTransaction()

* ENT-2261: Further expand coverage to ActionExecutorImpl.executeRemoveCheckpoint()

* ENT-2261: Further expand coverage to ActionExecutorImpl.executePersistDeduplicationIds() and ActionExecutorImpl.executeCommitTransaction()

* ENT-2261: Revert non-material change.
2018-07-18 13:18:01 +01:00
Shams Asari
ff607e1bc1
Moved network services tests back as unit tests (#3639) 2018-07-18 11:03:45 +01:00
Michal Kit
c0207b2219
CORDA-1815 adding maxTransactionSize validation (#3635)
* CORDA-1815 adding maxTransactionSize validation

* Fixing failing tests

* Fixing failing test
2018-07-18 10:34:41 +01:00
Chris Rankin
fbac6d7042 Remove RandomFree reference to fix merge. 2018-07-18 10:24:57 +01:00
Chris Rankin
aa50aaf95d Merge commit 'e879de7' into chrisr3-os-merge 2018-07-17 22:47:24 +01:00
Shams Asari
921b132658
Deprecated freeLocalHostAndPort, freePort and getFreeLocalPorts of TestUtils (#3630)
They're prone to cause flaky tests due to the "allocated" ports already being taken by the system when eventually needed. Replaced usages with PortAllocation.Incremental.

Affected unit tests made into integration tests to avoid any issues in the future when unit tests are made to run in parallel.
2018-07-17 14:42:30 +01:00
szymonsztuka
2003881b77
Features/fix integration test in database mode (#1276)
Fix new/altered integration tests to run in database mode, disable new H2 db specific test when running against a remote database.
2018-07-17 12:40:05 +01:00
bpaunescu
cb4e428ec4
Merge pull request #1275 from corda/bogdan-merge-160618
OS-ENT merge
2018-07-17 12:37:45 +01:00
Stefano Franz
829be5dfb6
CORDA-1747 fix issue around RPC return of generic objects (#3625)
* fix issue around RPC return of generic objects

* address review comments
2018-07-17 12:19:06 +01:00
bpaunescu
8b3f97ca8c Add long lost line of artemis magic 2018-07-17 11:08:12 +01:00
Shams Asari
736d62ec1a
Retire RandomFree as it causes flaky tests (#3626) 2018-07-17 10:29:47 +01:00
Patrick Kuo
52d281b66f
Merge pull request #1261 from corda/pat/crl-check-cherry-pick
CRL url checks and warning for mis-configurated CRL endpoint (#1258)
2018-07-16 11:43:21 +01:00
bpaunescu
dd268d4121 OS-ENT merge added missing imports 2018-07-16 11:00:04 +01:00
szymonsztuka
3d20a15180 Revert "CORDA-1804 Corda node stops when detecting not migrated node_attachments_contracts table name (#3593)"
This reverts commit 208ac49
Reverting because it's OS specific and tables are managed by Liquibase in ENT.
2018-07-16 10:24:31 +01:00
bpaunescu
5e5e28b50b OS-ENT merge address PR comments 2018-07-16 10:18:09 +01:00
bpaunescu
33ce848e0c OS-ENT merge 2018-07-16 10:00:16 +01:00
Konstantinos Chalkias
bf4f30fd39
Use newSecureRandom instead of SecureRandom (#3606) 2018-07-14 05:21:02 +01:00
szymonsztuka
208ac49da0
CORDA-1804 Corda node stops when detecting not migrated node_attachments_contracts table name (#3593)
Database table NODE_ATTACHMENTS_CONTRACT_CLASS_NAME in v3.0 was changed to NODE_ATTCHMENTS_CONTRACTS in v3.1 and then finally NODE_ATTACHMENTS_CONTRACTS on current master. Users may omit the upgrade note and run into errors. After the change the node will not start if the new table name is not found and any other older ones is found.
2018-07-13 16:23:20 +01:00
bpaunescu
ce787df5e5
ENT-2053: add exclusive flag to created P2P queues (except service ones); this is a sync with ENT (#3592) 2018-07-13 14:52:43 +01:00
rick.parker
21a7b56161 Fix up compilation errors. 2018-07-13 14:33:13 +01:00
Shams Asari
1d91272698
Moved a bunch of tests that were in the integration bucket into unit (#3576) 2018-07-13 14:17:56 +01:00
bpaunescu
92f59f2ad2
Revert " Create Artemis p2p.inbound addresses before starting the broker (#3407)" (#3590)
This reverts commit ed3944c54606e876abd6483ff5d66a764f9cf577.
2018-07-13 14:00:02 +01:00
Katarzyna Streich
4fb7f7d3d0
CORDA-1733 X500Principal configuration parsing (#3580)
CORDA-1733 X500Principal configuration parsing

Change the NodeConfiguration.tlsCertCrlIssuer type from String to X500Principal
2018-07-13 13:44:29 +01:00
rick.parker
4e81d26985 Merge remote-tracking branch 'remotes/open/master' into parkri-os-merge-20180713-1 2018-07-13 13:15:53 +01:00
Shams Asari
ab08ce21f4
Made NodeUnloadHandlerTests a unit test by using mock node (#3572) 2018-07-12 15:22:31 +01:00
Thomas Schroeter
12174fdaae
Add jib gradle plugin to node (#3571)
* Add jib gradle plugin to node

Available tasks:
./gradlew node:jibExportDockerContext
./gradlew node:jib --image <image>
2018-07-12 14:39:17 +01:00
Katarzyna Streich
b275f4349a
ENT-1968: Add RPC for refreshing network map cache (#3552)
ENT-1968: Add RPC for refreshing network map cache
2018-07-12 13:40:33 +01:00