ENT-5043 separate out test utils (#5998)

* 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
This commit is contained in:
Christian Sailer 2020-03-03 15:55:17 +00:00 committed by GitHub
parent fec2ef2fd3
commit e38cd9ec63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
149 changed files with 760 additions and 681 deletions

View File

@ -6818,6 +6818,392 @@ public static final class net.corda.core.utilities.UuidGenerator$Companion exten
public interface net.corda.core.utilities.VariablePropertyDelegate extends net.corda.core.utilities.PropertyDelegate public interface net.corda.core.utilities.VariablePropertyDelegate extends net.corda.core.utilities.PropertyDelegate
public abstract void setValue(Object, kotlin.reflect.KProperty<?>, T) public abstract void setValue(Object, kotlin.reflect.KProperty<?>, T)
## ##
public final class net.corda.testing.contracts.DummyContract extends java.lang.Object implements net.corda.core.contracts.Contract
public <init>()
public <init>(Object)
public <init>(Object, int, kotlin.jvm.internal.DefaultConstructorMarker)
@Nullable
public final Object component1()
@NotNull
public final net.corda.testing.contracts.DummyContract copy(Object)
public boolean equals(Object)
@NotNull
public static final net.corda.core.transactions.TransactionBuilder generateInitial(int, net.corda.core.identity.Party, net.corda.core.contracts.PartyAndReference, net.corda.core.contracts.PartyAndReference...)
@Nullable
public final Object getBlank()
@NotNull
public final String getPROGRAM_ID()
public int hashCode()
@NotNull
public static final net.corda.core.transactions.TransactionBuilder move(java.util.List<net.corda.core.contracts.StateAndRef<net.corda.testing.contracts.DummyContract$SingleOwnerState>>, net.corda.core.identity.AbstractParty)
@NotNull
public static final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef<net.corda.testing.contracts.DummyContract$SingleOwnerState>, net.corda.core.identity.AbstractParty)
@NotNull
public String toString()
public void verify(net.corda.core.transactions.LedgerTransaction)
public static final net.corda.testing.contracts.DummyContract$Companion Companion
@NotNull
public static final String PROGRAM_ID = "net.corda.testing.contracts.DummyContract"
##
public static interface net.corda.testing.contracts.DummyContract$Commands extends net.corda.core.contracts.CommandData
##
public static final class net.corda.testing.contracts.DummyContract$Commands$Create extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContract$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContract$Commands$Move extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContract$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContract$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public final net.corda.core.transactions.TransactionBuilder generateInitial(int, net.corda.core.identity.Party, net.corda.core.contracts.PartyAndReference, net.corda.core.contracts.PartyAndReference...)
@NotNull
public final net.corda.core.transactions.TransactionBuilder move(java.util.List<net.corda.core.contracts.StateAndRef<net.corda.testing.contracts.DummyContract$SingleOwnerState>>, net.corda.core.identity.AbstractParty)
@NotNull
public final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef<net.corda.testing.contracts.DummyContract$SingleOwnerState>, net.corda.core.identity.AbstractParty)
##
@DoNotImplement
public static final class net.corda.testing.contracts.DummyContract$MultiOwnerState extends java.lang.Object implements net.corda.testing.contracts.DummyContract$State
public <init>(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public <init>(int, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> component2()
@NotNull
public final net.corda.testing.contracts.DummyContract$MultiOwnerState copy(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public boolean equals(Object)
public int getMagicNumber()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> getOwners()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
##
@DoNotImplement
public static final class net.corda.testing.contracts.DummyContract$SingleOwnerState extends java.lang.Object implements net.corda.core.contracts.OwnableState, net.corda.testing.contracts.DummyContract$State
public <init>(int, net.corda.core.identity.AbstractParty)
public <init>(int, net.corda.core.identity.AbstractParty, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final net.corda.core.identity.AbstractParty component2()
@NotNull
public final net.corda.testing.contracts.DummyContract$SingleOwnerState copy(int, net.corda.core.identity.AbstractParty)
public boolean equals(Object)
public int getMagicNumber()
@NotNull
public net.corda.core.identity.AbstractParty getOwner()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
@NotNull
public net.corda.core.contracts.CommandAndState withNewOwner(net.corda.core.identity.AbstractParty)
##
@DoNotImplement
public static interface net.corda.testing.contracts.DummyContract$State extends net.corda.core.contracts.ContractState
public abstract int getMagicNumber()
##
public final class net.corda.testing.contracts.DummyContractV2 extends java.lang.Object implements net.corda.core.contracts.UpgradedContractWithLegacyConstraint
public <init>()
@NotNull
public String getLegacyContract()
@NotNull
public net.corda.core.contracts.AttachmentConstraint getLegacyContractConstraint()
@NotNull
public net.corda.testing.contracts.DummyContractV2$State upgrade(net.corda.testing.contracts.DummyContract$State)
public void verify(net.corda.core.transactions.LedgerTransaction)
public static final net.corda.testing.contracts.DummyContractV2$Companion Companion
@NotNull
public static final String PROGRAM_ID = "net.corda.testing.contracts.DummyContractV2"
##
public static interface net.corda.testing.contracts.DummyContractV2$Commands extends net.corda.core.contracts.CommandData
##
public static final class net.corda.testing.contracts.DummyContractV2$Commands$Create extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContractV2$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContractV2$Commands$Move extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContractV2$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContractV2$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
public static final class net.corda.testing.contracts.DummyContractV2$State extends java.lang.Object implements net.corda.core.contracts.ContractState
public <init>(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public <init>(int, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> component2()
@NotNull
public final net.corda.testing.contracts.DummyContractV2$State copy(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public boolean equals(Object)
public final int getMagicNumber()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> getOwners()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
##
public final class net.corda.testing.contracts.DummyContractV3 extends java.lang.Object implements net.corda.core.contracts.UpgradedContractWithLegacyConstraint
public <init>()
@NotNull
public String getLegacyContract()
@NotNull
public net.corda.core.contracts.AttachmentConstraint getLegacyContractConstraint()
@NotNull
public net.corda.testing.contracts.DummyContractV3$State upgrade(net.corda.testing.contracts.DummyContractV2$State)
public void verify(net.corda.core.transactions.LedgerTransaction)
public static final net.corda.testing.contracts.DummyContractV3$Companion Companion
@NotNull
public static final String PROGRAM_ID = "net.corda.testing.contracts.DummyContractV3"
##
public static interface net.corda.testing.contracts.DummyContractV3$Commands extends net.corda.core.contracts.CommandData
##
public static final class net.corda.testing.contracts.DummyContractV3$Commands$Create extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContractV3$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContractV3$Commands$Move extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContractV3$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContractV3$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
public static final class net.corda.testing.contracts.DummyContractV3$State extends java.lang.Object implements net.corda.core.contracts.ContractState
public <init>(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public <init>(int, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> component2()
@NotNull
public final net.corda.testing.contracts.DummyContractV3$State copy(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public boolean equals(Object)
public final int getMagicNumber()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> getOwners()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
##
@BelongsToContract
public final class net.corda.testing.contracts.DummyState extends java.lang.Object implements net.corda.core.contracts.ContractState
public <init>()
public <init>(int)
public <init>(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public <init>(int, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> component2()
@NotNull
public final net.corda.testing.contracts.DummyState copy(int)
@NotNull
public final net.corda.testing.contracts.DummyState copy(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public boolean equals(Object)
public final int getMagicNumber()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
##
public final class net.corda.testing.core.DummyCommandData extends net.corda.core.contracts.TypeOnlyCommandData
public static final net.corda.testing.core.DummyCommandData INSTANCE
##
public final class net.corda.testing.core.Expect extends java.lang.Object
public <init>(Class<T>, kotlin.jvm.functions.Function1<? super T, Boolean>, kotlin.jvm.functions.Function1<? super T, kotlin.Unit>)
@NotNull
public final Class<T> component1()
@NotNull
public final kotlin.jvm.functions.Function1<T, Boolean> component2()
@NotNull
public final kotlin.jvm.functions.Function1<T, kotlin.Unit> component3()
@NotNull
public final net.corda.testing.core.Expect<E, T> copy(Class<T>, kotlin.jvm.functions.Function1<? super T, Boolean>, kotlin.jvm.functions.Function1<? super T, kotlin.Unit>)
public boolean equals(Object)
@NotNull
public final Class<T> getClazz()
@NotNull
public final kotlin.jvm.functions.Function1<T, kotlin.Unit> getExpectClosure()
@NotNull
public final kotlin.jvm.functions.Function1<T, Boolean> getMatch()
public int hashCode()
@NotNull
public String toString()
##
@DoNotImplement
public abstract class net.corda.testing.core.ExpectCompose extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
@DoNotImplement
public static final class net.corda.testing.core.ExpectCompose$Parallel extends net.corda.testing.core.ExpectCompose
public <init>(java.util.List<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public final java.util.List<net.corda.testing.core.ExpectCompose<E>> getParallel()
##
@DoNotImplement
public static final class net.corda.testing.core.ExpectCompose$Sequential extends net.corda.testing.core.ExpectCompose
public <init>(java.util.List<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public final java.util.List<net.corda.testing.core.ExpectCompose<E>> getSequence()
##
@DoNotImplement
public static final class net.corda.testing.core.ExpectCompose$Single extends net.corda.testing.core.ExpectCompose
public <init>(net.corda.testing.core.Expect<? extends E, T>)
@NotNull
public final net.corda.testing.core.Expect<E, T> getExpect()
##
public static final class net.corda.testing.core.ExpectComposeState$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public final net.corda.testing.core.ExpectComposeState<E> fromExpectCompose(net.corda.testing.core.ExpectCompose<? extends E>)
##
public static final class net.corda.testing.core.ExpectComposeState$Finished extends net.corda.testing.core.ExpectComposeState
public <init>()
@NotNull
public java.util.List<Class<E>> getExpectedEvents()
@Nullable
public Void nextState(E)
##
public static final class net.corda.testing.core.ExpectComposeState$Parallel extends net.corda.testing.core.ExpectComposeState
public <init>(net.corda.testing.core.ExpectCompose$Parallel<? extends E>, java.util.List<? extends net.corda.testing.core.ExpectComposeState<E>>)
@NotNull
public java.util.List<Class<? extends E>> getExpectedEvents()
@NotNull
public final net.corda.testing.core.ExpectCompose$Parallel<E> getParallel()
@NotNull
public final java.util.List<net.corda.testing.core.ExpectComposeState<E>> getStates()
@Nullable
public kotlin.Pair<kotlin.jvm.functions.Function0<kotlin.Unit>, net.corda.testing.core.ExpectComposeState<E>> nextState(E)
##
public static final class net.corda.testing.core.ExpectComposeState$Sequential extends net.corda.testing.core.ExpectComposeState
public <init>(net.corda.testing.core.ExpectCompose$Sequential<? extends E>, int, net.corda.testing.core.ExpectComposeState<E>)
@NotNull
public java.util.List<Class<? extends E>> getExpectedEvents()
public final int getIndex()
@NotNull
public final net.corda.testing.core.ExpectCompose$Sequential<E> getSequential()
@NotNull
public final net.corda.testing.core.ExpectComposeState<E> getState()
@Nullable
public kotlin.Pair<kotlin.jvm.functions.Function0<kotlin.Unit>, net.corda.testing.core.ExpectComposeState<E>> nextState(E)
##
public static final class net.corda.testing.core.ExpectComposeState$Single extends net.corda.testing.core.ExpectComposeState
public <init>(net.corda.testing.core.ExpectCompose$Single<? extends E, T>)
@NotNull
public java.util.List<Class<T>> getExpectedEvents()
@NotNull
public final net.corda.testing.core.ExpectCompose$Single<E, T> getSingle()
@Nullable
public kotlin.Pair<kotlin.jvm.functions.Function0<kotlin.Unit>, net.corda.testing.core.ExpectComposeState<E>> nextState(E)
##
public final class net.corda.testing.core.ExpectKt extends java.lang.Object
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> expect(Class<E>, kotlin.jvm.functions.Function1<? super E, Boolean>, kotlin.jvm.functions.Function1<? super E, kotlin.Unit>)
public static final void expectEvents(Iterable<? extends E>, boolean, kotlin.jvm.functions.Function0<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
public static final void expectEvents(rx.Observable<E>, boolean, kotlin.jvm.functions.Function0<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
public static final void genericExpectEvents(S, boolean, kotlin.jvm.functions.Function2<? super S, ? super kotlin.jvm.functions.Function1<? super E, kotlin.Unit>, kotlin.Unit>, kotlin.jvm.functions.Function0<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> parallel(java.util.List<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> parallel(net.corda.testing.core.ExpectCompose<? extends E>...)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> replicate(int, kotlin.jvm.functions.Function1<? super Integer, ? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> sequence(java.util.List<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> sequence(net.corda.testing.core.ExpectCompose<? extends E>...)
##
public final class net.corda.testing.core.SerializationEnvironmentRule extends java.lang.Object implements org.junit.rules.TestRule
public <init>()
public <init>(boolean)
public <init>(boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description)
@NotNull
public final net.corda.core.serialization.SerializationFactory getSerializationFactory()
public static final net.corda.testing.core.SerializationEnvironmentRule$Companion Companion
##
public static final class net.corda.testing.core.SerializationEnvironmentRule$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
public final class net.corda.testing.core.TestConstants extends java.lang.Object
@NotNull
public static final net.corda.core.contracts.Command<net.corda.core.contracts.TypeOnlyCommandData> dummyCommand(java.security.PublicKey...)
@NotNull
public static final net.corda.core.identity.CordaX500Name ALICE_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name BOB_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name BOC_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name CHARLIE_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_A_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_B_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_C_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name DUMMY_NOTARY_NAME
public static final int MAX_MESSAGE_SIZE = 10485760
##
public final class net.corda.testing.core.TestIdentity extends java.lang.Object
public <init>(net.corda.core.identity.CordaX500Name)
public <init>(net.corda.core.identity.CordaX500Name, long)
public <init>(net.corda.core.identity.CordaX500Name, long, net.corda.core.crypto.SignatureScheme)
public <init>(net.corda.core.identity.CordaX500Name, long, net.corda.core.crypto.SignatureScheme, int, kotlin.jvm.internal.DefaultConstructorMarker)
public <init>(net.corda.core.identity.CordaX500Name, java.security.KeyPair)
public <init>(net.corda.core.identity.CordaX500Name, net.corda.core.crypto.SignatureScheme)
public <init>(net.corda.core.identity.CordaX500Name, net.corda.core.crypto.SignatureScheme, int, kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public static final net.corda.testing.core.TestIdentity fresh(String)
@NotNull
public static final net.corda.testing.core.TestIdentity fresh(String, net.corda.core.crypto.SignatureScheme)
@NotNull
public final net.corda.core.identity.PartyAndCertificate getIdentity()
@NotNull
public final java.security.KeyPair getKeyPair()
@NotNull
public final net.corda.core.identity.CordaX500Name getName()
@NotNull
public final net.corda.core.identity.Party getParty()
@NotNull
public final java.security.PublicKey getPublicKey()
@NotNull
public final net.corda.core.contracts.PartyAndReference ref(byte...)
public static final net.corda.testing.core.TestIdentity$Companion Companion
##
public static final class net.corda.testing.core.TestIdentity$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public final net.corda.testing.core.TestIdentity fresh(String)
@NotNull
public final net.corda.testing.core.TestIdentity fresh(String, net.corda.core.crypto.SignatureScheme)
##
public final class net.corda.testing.core.TestUtils extends java.lang.Object
@NotNull
public static final net.corda.core.utilities.NetworkHostAndPort freeLocalHostAndPort()
public static final int freePort()
@NotNull
public static final net.corda.core.contracts.StateRef generateStateRef()
@NotNull
public static final java.util.List<net.corda.core.utilities.NetworkHostAndPort> getFreeLocalPorts(String, int)
@NotNull
public static final net.corda.core.identity.PartyAndCertificate getTestPartyAndCertificate(net.corda.core.identity.CordaX500Name, java.security.PublicKey)
@NotNull
public static final net.corda.core.identity.PartyAndCertificate getTestPartyAndCertificate(net.corda.core.identity.Party)
@NotNull
public static final net.corda.core.identity.CordaX500Name makeUnique(net.corda.core.identity.CordaX500Name)
@NotNull
public static final net.corda.core.identity.Party singleIdentity(net.corda.core.node.NodeInfo)
@NotNull
public static final net.corda.core.identity.PartyAndCertificate singleIdentityAndCert(net.corda.core.node.NodeInfo)
##
public final class net.corda.client.jackson.JacksonSupport extends java.lang.Object public final class net.corda.client.jackson.JacksonSupport extends java.lang.Object
@NotNull @NotNull
public static final com.fasterxml.jackson.databind.ObjectMapper createDefaultMapper(net.corda.core.messaging.CordaRPCOps) public static final com.fasterxml.jackson.databind.ObjectMapper createDefaultMapper(net.corda.core.messaging.CordaRPCOps)
@ -8148,392 +8534,6 @@ public static class net.corda.finance.test.SampleCashSchemaV3$PersistentCashStat
public void setParticipants(java.util.Set<net.corda.core.identity.AbstractParty>) public void setParticipants(java.util.Set<net.corda.core.identity.AbstractParty>)
public void setPennies(long) public void setPennies(long)
## ##
public final class net.corda.testing.contracts.DummyContract extends java.lang.Object implements net.corda.core.contracts.Contract
public <init>()
public <init>(Object)
public <init>(Object, int, kotlin.jvm.internal.DefaultConstructorMarker)
@Nullable
public final Object component1()
@NotNull
public final net.corda.testing.contracts.DummyContract copy(Object)
public boolean equals(Object)
@NotNull
public static final net.corda.core.transactions.TransactionBuilder generateInitial(int, net.corda.core.identity.Party, net.corda.core.contracts.PartyAndReference, net.corda.core.contracts.PartyAndReference...)
@Nullable
public final Object getBlank()
@NotNull
public final String getPROGRAM_ID()
public int hashCode()
@NotNull
public static final net.corda.core.transactions.TransactionBuilder move(java.util.List<net.corda.core.contracts.StateAndRef<net.corda.testing.contracts.DummyContract$SingleOwnerState>>, net.corda.core.identity.AbstractParty)
@NotNull
public static final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef<net.corda.testing.contracts.DummyContract$SingleOwnerState>, net.corda.core.identity.AbstractParty)
@NotNull
public String toString()
public void verify(net.corda.core.transactions.LedgerTransaction)
public static final net.corda.testing.contracts.DummyContract$Companion Companion
@NotNull
public static final String PROGRAM_ID = "net.corda.testing.contracts.DummyContract"
##
public static interface net.corda.testing.contracts.DummyContract$Commands extends net.corda.core.contracts.CommandData
##
public static final class net.corda.testing.contracts.DummyContract$Commands$Create extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContract$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContract$Commands$Move extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContract$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContract$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public final net.corda.core.transactions.TransactionBuilder generateInitial(int, net.corda.core.identity.Party, net.corda.core.contracts.PartyAndReference, net.corda.core.contracts.PartyAndReference...)
@NotNull
public final net.corda.core.transactions.TransactionBuilder move(java.util.List<net.corda.core.contracts.StateAndRef<net.corda.testing.contracts.DummyContract$SingleOwnerState>>, net.corda.core.identity.AbstractParty)
@NotNull
public final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef<net.corda.testing.contracts.DummyContract$SingleOwnerState>, net.corda.core.identity.AbstractParty)
##
@DoNotImplement
public static final class net.corda.testing.contracts.DummyContract$MultiOwnerState extends java.lang.Object implements net.corda.testing.contracts.DummyContract$State
public <init>(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public <init>(int, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> component2()
@NotNull
public final net.corda.testing.contracts.DummyContract$MultiOwnerState copy(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public boolean equals(Object)
public int getMagicNumber()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> getOwners()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
##
@DoNotImplement
public static final class net.corda.testing.contracts.DummyContract$SingleOwnerState extends java.lang.Object implements net.corda.core.contracts.OwnableState, net.corda.testing.contracts.DummyContract$State
public <init>(int, net.corda.core.identity.AbstractParty)
public <init>(int, net.corda.core.identity.AbstractParty, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final net.corda.core.identity.AbstractParty component2()
@NotNull
public final net.corda.testing.contracts.DummyContract$SingleOwnerState copy(int, net.corda.core.identity.AbstractParty)
public boolean equals(Object)
public int getMagicNumber()
@NotNull
public net.corda.core.identity.AbstractParty getOwner()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
@NotNull
public net.corda.core.contracts.CommandAndState withNewOwner(net.corda.core.identity.AbstractParty)
##
@DoNotImplement
public static interface net.corda.testing.contracts.DummyContract$State extends net.corda.core.contracts.ContractState
public abstract int getMagicNumber()
##
public final class net.corda.testing.contracts.DummyContractV2 extends java.lang.Object implements net.corda.core.contracts.UpgradedContractWithLegacyConstraint
public <init>()
@NotNull
public String getLegacyContract()
@NotNull
public net.corda.core.contracts.AttachmentConstraint getLegacyContractConstraint()
@NotNull
public net.corda.testing.contracts.DummyContractV2$State upgrade(net.corda.testing.contracts.DummyContract$State)
public void verify(net.corda.core.transactions.LedgerTransaction)
public static final net.corda.testing.contracts.DummyContractV2$Companion Companion
@NotNull
public static final String PROGRAM_ID = "net.corda.testing.contracts.DummyContractV2"
##
public static interface net.corda.testing.contracts.DummyContractV2$Commands extends net.corda.core.contracts.CommandData
##
public static final class net.corda.testing.contracts.DummyContractV2$Commands$Create extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContractV2$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContractV2$Commands$Move extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContractV2$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContractV2$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
public static final class net.corda.testing.contracts.DummyContractV2$State extends java.lang.Object implements net.corda.core.contracts.ContractState
public <init>(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public <init>(int, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> component2()
@NotNull
public final net.corda.testing.contracts.DummyContractV2$State copy(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public boolean equals(Object)
public final int getMagicNumber()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> getOwners()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
##
public final class net.corda.testing.contracts.DummyContractV3 extends java.lang.Object implements net.corda.core.contracts.UpgradedContractWithLegacyConstraint
public <init>()
@NotNull
public String getLegacyContract()
@NotNull
public net.corda.core.contracts.AttachmentConstraint getLegacyContractConstraint()
@NotNull
public net.corda.testing.contracts.DummyContractV3$State upgrade(net.corda.testing.contracts.DummyContractV2$State)
public void verify(net.corda.core.transactions.LedgerTransaction)
public static final net.corda.testing.contracts.DummyContractV3$Companion Companion
@NotNull
public static final String PROGRAM_ID = "net.corda.testing.contracts.DummyContractV3"
##
public static interface net.corda.testing.contracts.DummyContractV3$Commands extends net.corda.core.contracts.CommandData
##
public static final class net.corda.testing.contracts.DummyContractV3$Commands$Create extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContractV3$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContractV3$Commands$Move extends net.corda.core.contracts.TypeOnlyCommandData implements net.corda.testing.contracts.DummyContractV3$Commands
public <init>()
##
public static final class net.corda.testing.contracts.DummyContractV3$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
public static final class net.corda.testing.contracts.DummyContractV3$State extends java.lang.Object implements net.corda.core.contracts.ContractState
public <init>(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public <init>(int, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> component2()
@NotNull
public final net.corda.testing.contracts.DummyContractV3$State copy(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public boolean equals(Object)
public final int getMagicNumber()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> getOwners()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
##
@BelongsToContract
public final class net.corda.testing.contracts.DummyState extends java.lang.Object implements net.corda.core.contracts.ContractState
public <init>()
public <init>(int)
public <init>(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public <init>(int, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker)
public final int component1()
@NotNull
public final java.util.List<net.corda.core.identity.AbstractParty> component2()
@NotNull
public final net.corda.testing.contracts.DummyState copy(int)
@NotNull
public final net.corda.testing.contracts.DummyState copy(int, java.util.List<? extends net.corda.core.identity.AbstractParty>)
public boolean equals(Object)
public final int getMagicNumber()
@NotNull
public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
public int hashCode()
@NotNull
public String toString()
##
public final class net.corda.testing.core.DummyCommandData extends net.corda.core.contracts.TypeOnlyCommandData
public static final net.corda.testing.core.DummyCommandData INSTANCE
##
public final class net.corda.testing.core.Expect extends java.lang.Object
public <init>(Class<T>, kotlin.jvm.functions.Function1<? super T, Boolean>, kotlin.jvm.functions.Function1<? super T, kotlin.Unit>)
@NotNull
public final Class<T> component1()
@NotNull
public final kotlin.jvm.functions.Function1<T, Boolean> component2()
@NotNull
public final kotlin.jvm.functions.Function1<T, kotlin.Unit> component3()
@NotNull
public final net.corda.testing.core.Expect<E, T> copy(Class<T>, kotlin.jvm.functions.Function1<? super T, Boolean>, kotlin.jvm.functions.Function1<? super T, kotlin.Unit>)
public boolean equals(Object)
@NotNull
public final Class<T> getClazz()
@NotNull
public final kotlin.jvm.functions.Function1<T, kotlin.Unit> getExpectClosure()
@NotNull
public final kotlin.jvm.functions.Function1<T, Boolean> getMatch()
public int hashCode()
@NotNull
public String toString()
##
@DoNotImplement
public abstract class net.corda.testing.core.ExpectCompose extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
@DoNotImplement
public static final class net.corda.testing.core.ExpectCompose$Parallel extends net.corda.testing.core.ExpectCompose
public <init>(java.util.List<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public final java.util.List<net.corda.testing.core.ExpectCompose<E>> getParallel()
##
@DoNotImplement
public static final class net.corda.testing.core.ExpectCompose$Sequential extends net.corda.testing.core.ExpectCompose
public <init>(java.util.List<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public final java.util.List<net.corda.testing.core.ExpectCompose<E>> getSequence()
##
@DoNotImplement
public static final class net.corda.testing.core.ExpectCompose$Single extends net.corda.testing.core.ExpectCompose
public <init>(net.corda.testing.core.Expect<? extends E, T>)
@NotNull
public final net.corda.testing.core.Expect<E, T> getExpect()
##
public static final class net.corda.testing.core.ExpectComposeState$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public final net.corda.testing.core.ExpectComposeState<E> fromExpectCompose(net.corda.testing.core.ExpectCompose<? extends E>)
##
public static final class net.corda.testing.core.ExpectComposeState$Finished extends net.corda.testing.core.ExpectComposeState
public <init>()
@NotNull
public java.util.List<Class<E>> getExpectedEvents()
@Nullable
public Void nextState(E)
##
public static final class net.corda.testing.core.ExpectComposeState$Parallel extends net.corda.testing.core.ExpectComposeState
public <init>(net.corda.testing.core.ExpectCompose$Parallel<? extends E>, java.util.List<? extends net.corda.testing.core.ExpectComposeState<E>>)
@NotNull
public java.util.List<Class<? extends E>> getExpectedEvents()
@NotNull
public final net.corda.testing.core.ExpectCompose$Parallel<E> getParallel()
@NotNull
public final java.util.List<net.corda.testing.core.ExpectComposeState<E>> getStates()
@Nullable
public kotlin.Pair<kotlin.jvm.functions.Function0<kotlin.Unit>, net.corda.testing.core.ExpectComposeState<E>> nextState(E)
##
public static final class net.corda.testing.core.ExpectComposeState$Sequential extends net.corda.testing.core.ExpectComposeState
public <init>(net.corda.testing.core.ExpectCompose$Sequential<? extends E>, int, net.corda.testing.core.ExpectComposeState<E>)
@NotNull
public java.util.List<Class<? extends E>> getExpectedEvents()
public final int getIndex()
@NotNull
public final net.corda.testing.core.ExpectCompose$Sequential<E> getSequential()
@NotNull
public final net.corda.testing.core.ExpectComposeState<E> getState()
@Nullable
public kotlin.Pair<kotlin.jvm.functions.Function0<kotlin.Unit>, net.corda.testing.core.ExpectComposeState<E>> nextState(E)
##
public static final class net.corda.testing.core.ExpectComposeState$Single extends net.corda.testing.core.ExpectComposeState
public <init>(net.corda.testing.core.ExpectCompose$Single<? extends E, T>)
@NotNull
public java.util.List<Class<T>> getExpectedEvents()
@NotNull
public final net.corda.testing.core.ExpectCompose$Single<E, T> getSingle()
@Nullable
public kotlin.Pair<kotlin.jvm.functions.Function0<kotlin.Unit>, net.corda.testing.core.ExpectComposeState<E>> nextState(E)
##
public final class net.corda.testing.core.ExpectKt extends java.lang.Object
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> expect(Class<E>, kotlin.jvm.functions.Function1<? super E, Boolean>, kotlin.jvm.functions.Function1<? super E, kotlin.Unit>)
public static final void expectEvents(Iterable<? extends E>, boolean, kotlin.jvm.functions.Function0<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
public static final void expectEvents(rx.Observable<E>, boolean, kotlin.jvm.functions.Function0<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
public static final void genericExpectEvents(S, boolean, kotlin.jvm.functions.Function2<? super S, ? super kotlin.jvm.functions.Function1<? super E, kotlin.Unit>, kotlin.Unit>, kotlin.jvm.functions.Function0<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> parallel(java.util.List<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> parallel(net.corda.testing.core.ExpectCompose<? extends E>...)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> replicate(int, kotlin.jvm.functions.Function1<? super Integer, ? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> sequence(java.util.List<? extends net.corda.testing.core.ExpectCompose<? extends E>>)
@NotNull
public static final net.corda.testing.core.ExpectCompose<E> sequence(net.corda.testing.core.ExpectCompose<? extends E>...)
##
public final class net.corda.testing.core.SerializationEnvironmentRule extends java.lang.Object implements org.junit.rules.TestRule
public <init>()
public <init>(boolean)
public <init>(boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description)
@NotNull
public final net.corda.core.serialization.SerializationFactory getSerializationFactory()
public static final net.corda.testing.core.SerializationEnvironmentRule$Companion Companion
##
public static final class net.corda.testing.core.SerializationEnvironmentRule$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
public final class net.corda.testing.core.TestConstants extends java.lang.Object
@NotNull
public static final net.corda.core.contracts.Command<net.corda.core.contracts.TypeOnlyCommandData> dummyCommand(java.security.PublicKey...)
@NotNull
public static final net.corda.core.identity.CordaX500Name ALICE_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name BOB_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name BOC_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name CHARLIE_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_A_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_B_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name DUMMY_BANK_C_NAME
@NotNull
public static final net.corda.core.identity.CordaX500Name DUMMY_NOTARY_NAME
public static final int MAX_MESSAGE_SIZE = 10485760
##
public final class net.corda.testing.core.TestIdentity extends java.lang.Object
public <init>(net.corda.core.identity.CordaX500Name)
public <init>(net.corda.core.identity.CordaX500Name, long)
public <init>(net.corda.core.identity.CordaX500Name, long, net.corda.core.crypto.SignatureScheme)
public <init>(net.corda.core.identity.CordaX500Name, long, net.corda.core.crypto.SignatureScheme, int, kotlin.jvm.internal.DefaultConstructorMarker)
public <init>(net.corda.core.identity.CordaX500Name, java.security.KeyPair)
public <init>(net.corda.core.identity.CordaX500Name, net.corda.core.crypto.SignatureScheme)
public <init>(net.corda.core.identity.CordaX500Name, net.corda.core.crypto.SignatureScheme, int, kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public static final net.corda.testing.core.TestIdentity fresh(String)
@NotNull
public static final net.corda.testing.core.TestIdentity fresh(String, net.corda.core.crypto.SignatureScheme)
@NotNull
public final net.corda.core.identity.PartyAndCertificate getIdentity()
@NotNull
public final java.security.KeyPair getKeyPair()
@NotNull
public final net.corda.core.identity.CordaX500Name getName()
@NotNull
public final net.corda.core.identity.Party getParty()
@NotNull
public final java.security.PublicKey getPublicKey()
@NotNull
public final net.corda.core.contracts.PartyAndReference ref(byte...)
public static final net.corda.testing.core.TestIdentity$Companion Companion
##
public static final class net.corda.testing.core.TestIdentity$Companion extends java.lang.Object
public <init>(kotlin.jvm.internal.DefaultConstructorMarker)
@NotNull
public final net.corda.testing.core.TestIdentity fresh(String)
@NotNull
public final net.corda.testing.core.TestIdentity fresh(String, net.corda.core.crypto.SignatureScheme)
##
public final class net.corda.testing.core.TestUtils extends java.lang.Object
@NotNull
public static final net.corda.core.utilities.NetworkHostAndPort freeLocalHostAndPort()
public static final int freePort()
@NotNull
public static final net.corda.core.contracts.StateRef generateStateRef()
@NotNull
public static final java.util.List<net.corda.core.utilities.NetworkHostAndPort> getFreeLocalPorts(String, int)
@NotNull
public static final net.corda.core.identity.PartyAndCertificate getTestPartyAndCertificate(net.corda.core.identity.CordaX500Name, java.security.PublicKey)
@NotNull
public static final net.corda.core.identity.PartyAndCertificate getTestPartyAndCertificate(net.corda.core.identity.Party)
@NotNull
public static final net.corda.core.identity.CordaX500Name makeUnique(net.corda.core.identity.CordaX500Name)
@NotNull
public static final net.corda.core.identity.Party singleIdentity(net.corda.core.node.NodeInfo)
@NotNull
public static final net.corda.core.identity.PartyAndCertificate singleIdentityAndCert(net.corda.core.node.NodeInfo)
##
public final class net.corda.testing.dsl.AttachmentResolutionException extends net.corda.core.flows.FlowException public final class net.corda.testing.dsl.AttachmentResolutionException extends net.corda.core.flows.FlowException
public <init>(net.corda.core.crypto.SecureHash) public <init>(net.corda.core.crypto.SecureHash)
## ##

View File

@ -83,6 +83,8 @@ buildscript {
ext.tcnative_version = '2.0.14.Final' ext.tcnative_version = '2.0.14.Final'
ext.typesafe_config_version = constants.getProperty("typesafeConfigVersion") ext.typesafe_config_version = constants.getProperty("typesafeConfigVersion")
ext.fileupload_version = '1.4' ext.fileupload_version = '1.4'
ext.kryo_version = '4.0.2'
ext.kryo_serializer_version = '0.43'
// Legacy JUnit 4 version // Legacy JUnit 4 version
ext.junit_version = '4.12' ext.junit_version = '4.12'
// Need this version to access classpath scanning error handling fix - // Need this version to access classpath scanning error handling fix -
@ -515,6 +517,7 @@ bintrayConfig {
'corda-node-api', 'corda-node-api',
'corda-node-djvm', 'corda-node-djvm',
'corda-test-common', 'corda-test-common',
'corda-core-test-utils',
'corda-test-utils', 'corda-test-utils',
'corda-test-db', 'corda-test-db',
'corda-jackson', 'corda-jackson',

View File

@ -42,8 +42,8 @@ import net.corda.nodeapi.internal.crypto.x509Certificates
import net.corda.testing.common.internal.testNetworkParameters import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.contracts.DummyContract import net.corda.testing.contracts.DummyContract
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.createNodeInfoAndSigned import net.corda.coretesting.internal.createNodeInfoAndSigned
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.Before import org.junit.Before

View File

@ -103,7 +103,7 @@ dependencies {
smokeTestRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" smokeTestRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}"
// JDK11: required by Quasar at run-time // JDK11: required by Quasar at run-time
smokeTestRuntimeOnly "com.esotericsoftware:kryo:4.0.2" smokeTestRuntimeOnly "com.esotericsoftware:kryo:$kryo_version"
} }
task integrationTest(type: Test) { task integrationTest(type: Test) {

View File

@ -20,7 +20,7 @@ import net.corda.testing.common.internal.eventually
import net.corda.testing.common.internal.succeeds import net.corda.testing.common.internal.succeeds
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.driver.internal.incrementalPortAllocation import net.corda.testing.driver.internal.incrementalPortAllocation
import net.corda.testing.internal.testThreadFactory import net.corda.coretesting.internal.testThreadFactory
import net.corda.testing.node.internal.RPCDriverDSL import net.corda.testing.node.internal.RPCDriverDSL
import net.corda.testing.node.internal.RpcBrokerHandle import net.corda.testing.node.internal.RpcBrokerHandle
import net.corda.testing.node.internal.RpcServerHandle import net.corda.testing.node.internal.RpcServerHandle

View File

@ -3,7 +3,7 @@ package net.corda.client.rpc
import com.github.benmanes.caffeine.cache.Caffeine import com.github.benmanes.caffeine.cache.Caffeine
import net.corda.client.rpc.internal.RPCClient import net.corda.client.rpc.internal.RPCClient
import net.corda.client.rpc.internal.ReconnectingCordaRPCOps import net.corda.client.rpc.internal.ReconnectingCordaRPCOps
import net.corda.client.rpc.internal.serialization.amqp.AMQPClientSerializationScheme import net.corda.nodeapi.internal.rpc.client.AMQPClientSerializationScheme
import net.corda.client.rpc.reconnect.CouldNotStartFlowException import net.corda.client.rpc.reconnect.CouldNotStartFlowException
import net.corda.core.CordaInternal import net.corda.core.CordaInternal
import net.corda.core.context.Actor import net.corda.core.context.Actor

View File

@ -1,6 +1,5 @@
package net.corda.client.rpc.internal package net.corda.client.rpc.internal
import com.github.benmanes.caffeine.cache.Cache
import com.github.benmanes.caffeine.cache.Caffeine import com.github.benmanes.caffeine.cache.Caffeine
import com.github.benmanes.caffeine.cache.RemovalCause import com.github.benmanes.caffeine.cache.RemovalCause
import com.github.benmanes.caffeine.cache.RemovalListener import com.github.benmanes.caffeine.cache.RemovalListener
@ -11,7 +10,7 @@ import net.corda.client.rpc.ConnectionFailureException
import net.corda.client.rpc.CordaRPCClientConfiguration import net.corda.client.rpc.CordaRPCClientConfiguration
import net.corda.client.rpc.RPCException import net.corda.client.rpc.RPCException
import net.corda.client.rpc.RPCSinceVersion import net.corda.client.rpc.RPCSinceVersion
import net.corda.client.rpc.internal.serialization.amqp.RpcClientObservableDeSerializer import net.corda.nodeapi.internal.rpc.client.RpcClientObservableDeSerializer
import net.corda.core.context.Actor import net.corda.core.context.Actor
import net.corda.core.context.Trace import net.corda.core.context.Trace
import net.corda.core.context.Trace.InvocationId import net.corda.core.context.Trace.InvocationId
@ -33,6 +32,10 @@ import net.corda.core.utilities.getOrThrow
import net.corda.nodeapi.RPCApi import net.corda.nodeapi.RPCApi
import net.corda.nodeapi.RPCApi.CLASS_METHOD_DIVIDER import net.corda.nodeapi.RPCApi.CLASS_METHOD_DIVIDER
import net.corda.nodeapi.internal.DeduplicationChecker import net.corda.nodeapi.internal.DeduplicationChecker
import net.corda.nodeapi.internal.rpc.client.CallSite
import net.corda.nodeapi.internal.rpc.client.CallSiteMap
import net.corda.nodeapi.internal.rpc.client.ObservableContext
import net.corda.nodeapi.internal.rpc.client.RpcObservableMap
import org.apache.activemq.artemis.api.core.ActiveMQException import org.apache.activemq.artemis.api.core.ActiveMQException
import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException
import org.apache.activemq.artemis.api.core.RoutingType import org.apache.activemq.artemis.api.core.RoutingType
@ -257,9 +260,6 @@ class RPCClientProxyHandler(
startSessions() startSessions()
} }
/** A throwable that doesn't represent a real error - it's just here to wrap a stack trace. */
class CallSite(val rpcName: String) : Throwable("<Call site of root RPC '$rpcName'>")
// This is the general function that transforms a client side RPC to internal Artemis messages. // This is the general function that transforms a client side RPC to internal Artemis messages.
override fun invoke(proxy: Any, method: Method, arguments: Array<out Any?>?): Any? { override fun invoke(proxy: Any, method: Method, arguments: Array<out Any?>?): Any? {
lifeCycle.requireState { it == State.STARTED || it == State.SERVER_VERSION_NOT_SET } lifeCycle.requireState { it == State.STARTED || it == State.SERVER_VERSION_NOT_SET }
@ -666,20 +666,5 @@ class RPCClientProxyHandler(
} }
} }
private typealias RpcObservableMap = Cache<InvocationId, UnicastSubject<Notification<*>>> private typealias RpcReplyMap = ConcurrentHashMap<Trace.InvocationId, SettableFuture<Any?>>
private typealias RpcReplyMap = ConcurrentHashMap<InvocationId, SettableFuture<Any?>>
private typealias CallSiteMap = ConcurrentHashMap<InvocationId, RPCClientProxyHandler.CallSite?>
/**
* Holds a context available during de-serialisation of messages that are expected to contain Observables.
*
* @property observableMap holds the Observables that are ultimately exposed to the user.
* @property hardReferenceStore holds references to Observables we want to keep alive while they are subscribed to.
* @property callSiteMap keeps stack traces captured when an RPC was invoked, useful for debugging when an observable leaks.
*/
data class ObservableContext(
val callSiteMap: CallSiteMap?,
val observableMap: RpcObservableMap,
val hardReferenceStore: MutableSet<Observable<*>>
)

View File

@ -8,7 +8,7 @@ import net.corda.core.serialization.CordaSerializable
import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.getOrThrow
import net.corda.core.utilities.millis import net.corda.core.utilities.millis
import net.corda.node.services.rpc.RPCServerConfiguration import net.corda.node.services.rpc.RPCServerConfiguration
import net.corda.testing.internal.testThreadFactory import net.corda.coretesting.internal.testThreadFactory
import net.corda.testing.node.internal.RPCDriverDSL import net.corda.testing.node.internal.RPCDriverDSL
import net.corda.testing.node.internal.rpcDriver import net.corda.testing.node.internal.rpcDriver
import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet

View File

@ -5,7 +5,7 @@ import net.corda.core.messaging.RPCOps
import net.corda.core.utilities.minutes import net.corda.core.utilities.minutes
import net.corda.core.utilities.seconds import net.corda.core.utilities.seconds
import net.corda.node.services.rpc.RPCServerConfiguration import net.corda.node.services.rpc.RPCServerConfiguration
import net.corda.testing.internal.performance.div import net.corda.coretesting.internal.performance.div
import net.corda.testing.node.internal.RPCDriverDSL import net.corda.testing.node.internal.RPCDriverDSL
import net.corda.testing.node.internal.performance.startPublishingFixedRateInjector import net.corda.testing.node.internal.performance.startPublishingFixedRateInjector
import net.corda.testing.node.internal.performance.startReporter import net.corda.testing.node.internal.performance.startReporter

View File

@ -9,4 +9,4 @@ package net.corda.common.logging
* (originally added to source control for ease of use) * (originally added to source control for ease of use)
*/ */
internal const val CURRENT_MAJOR_RELEASE = "4.5-SNAPSHOT" internal const val CURRENT_MAJOR_RELEASE = "4.5-SNAPSHOT"

View File

@ -15,9 +15,9 @@ import net.corda.core.identity.AnonymousParty
import net.corda.core.identity.Party import net.corda.core.identity.Party
import net.corda.core.identity.PartyAndCertificate import net.corda.core.identity.PartyAndCertificate
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.matchers.allOf import net.corda.coretesting.internal.matchers.allOf
import net.corda.testing.internal.matchers.flow.willReturn import net.corda.coretesting.internal.matchers.flow.willReturn
import net.corda.testing.internal.matchers.hasOnlyEntries import net.corda.coretesting.internal.matchers.hasOnlyEntries
import net.corda.testing.node.internal.InternalMockNetwork import net.corda.testing.node.internal.InternalMockNetwork
import net.corda.testing.node.internal.TestStartedNode import net.corda.testing.node.internal.TestStartedNode
import net.corda.testing.node.internal.enclosedCordapp import net.corda.testing.node.internal.enclosedCordapp

View File

@ -24,7 +24,7 @@ import net.corda.testing.core.TestIdentity
import net.corda.testing.dsl.LedgerDSL import net.corda.testing.dsl.LedgerDSL
import net.corda.testing.dsl.TestLedgerDSLInterpreter import net.corda.testing.dsl.TestLedgerDSLInterpreter
import net.corda.testing.dsl.TestTransactionDSLInterpreter import net.corda.testing.dsl.TestTransactionDSLInterpreter
import net.corda.testing.internal.TEST_TX_TIME import net.corda.coretesting.internal.TEST_TX_TIME
import net.corda.testing.internal.createWireTransaction import net.corda.testing.internal.createWireTransaction
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import net.corda.testing.node.ledger import net.corda.testing.node.ledger

View File

@ -21,8 +21,8 @@ import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.makeUnique import net.corda.testing.core.makeUnique
import net.corda.testing.core.singleIdentity import net.corda.testing.core.singleIdentity
import net.corda.testing.internal.fakeAttachment import net.corda.testing.internal.fakeAttachment
import net.corda.testing.internal.matchers.flow.willReturn import net.corda.coretesting.internal.matchers.flow.willReturn
import net.corda.testing.internal.matchers.flow.willThrow import net.corda.coretesting.internal.matchers.flow.willThrow
import net.corda.testing.node.internal.InternalMockNetwork import net.corda.testing.node.internal.InternalMockNetwork
import net.corda.testing.node.internal.InternalMockNodeParameters import net.corda.testing.node.internal.InternalMockNodeParameters
import net.corda.testing.node.internal.TestStartedNode import net.corda.testing.node.internal.TestStartedNode

View File

@ -30,9 +30,9 @@ import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.CHARLIE_NAME import net.corda.testing.core.CHARLIE_NAME
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.core.singleIdentity import net.corda.testing.core.singleIdentity
import net.corda.testing.internal.matchers.flow.willReturn import net.corda.coretesting.internal.matchers.flow.willReturn
import net.corda.testing.internal.matchers.flow.willThrow import net.corda.coretesting.internal.matchers.flow.willThrow
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import net.corda.testing.node.internal.DUMMY_CONTRACTS_CORDAPP import net.corda.testing.node.internal.DUMMY_CONTRACTS_CORDAPP
import net.corda.testing.node.internal.InternalMockNetwork import net.corda.testing.node.internal.InternalMockNetwork

View File

@ -18,8 +18,8 @@ import net.corda.testing.contracts.DummyContractV2
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.BOB_NAME import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.singleIdentity import net.corda.testing.core.singleIdentity
import net.corda.testing.internal.matchers.rpc.willReturn import net.corda.coretesting.internal.matchers.rpc.willReturn
import net.corda.testing.internal.matchers.rpc.willThrow import net.corda.coretesting.internal.matchers.rpc.willThrow
import net.corda.testing.node.User import net.corda.testing.node.User
import net.corda.testing.node.internal.* import net.corda.testing.node.internal.*
import org.junit.AfterClass import org.junit.AfterClass

View File

@ -20,8 +20,8 @@ import net.corda.testing.contracts.DummyContractV3
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.BOB_NAME import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.singleIdentity import net.corda.testing.core.singleIdentity
import net.corda.testing.internal.matchers.flow.willReturn import net.corda.coretesting.internal.matchers.flow.willReturn
import net.corda.testing.internal.matchers.flow.willThrow import net.corda.coretesting.internal.matchers.flow.willThrow
import net.corda.testing.node.internal.* import net.corda.testing.node.internal.*
import org.junit.AfterClass import org.junit.AfterClass
import org.junit.Test import org.junit.Test

View File

@ -13,8 +13,8 @@ import net.corda.finance.POUNDS
import net.corda.finance.contracts.asset.Cash import net.corda.finance.contracts.asset.Cash
import net.corda.finance.issuedBy import net.corda.finance.issuedBy
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.matchers.flow.willReturn import net.corda.coretesting.internal.matchers.flow.willReturn
import net.corda.testing.internal.matchers.flow.willThrow import net.corda.coretesting.internal.matchers.flow.willThrow
import net.corda.testing.node.internal.* import net.corda.testing.node.internal.*
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.After import org.junit.After

View File

@ -11,7 +11,7 @@ import net.corda.testing.core.singleIdentity
import net.corda.testing.flows.from import net.corda.testing.flows.from
import net.corda.testing.flows.receiveAll import net.corda.testing.flows.receiveAll
import net.corda.testing.flows.registerCordappFlowFactory import net.corda.testing.flows.registerCordappFlowFactory
import net.corda.testing.internal.matchers.flow.willReturn import net.corda.coretesting.internal.matchers.flow.willReturn
import net.corda.testing.node.internal.InternalMockNetwork import net.corda.testing.node.internal.InternalMockNetwork
import net.corda.testing.node.internal.TestStartedNode import net.corda.testing.node.internal.TestStartedNode
import org.junit.AfterClass import org.junit.AfterClass

View File

@ -12,7 +12,7 @@ import net.corda.nodeapi.internal.crypto.X509KeyStore
import net.corda.nodeapi.internal.crypto.X509Utilities import net.corda.nodeapi.internal.crypto.X509Utilities
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.core.getTestPartyAndCertificate import net.corda.testing.core.getTestPartyAndCertificate
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.coretesting.internal.DEV_ROOT_CA
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test

View File

@ -19,8 +19,8 @@ import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.core.DUMMY_NOTARY_NAME import net.corda.testing.core.DUMMY_NOTARY_NAME
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.internal.TEST_TX_TIME import net.corda.coretesting.internal.TEST_TX_TIME
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import org.junit.Before import org.junit.Before
import org.junit.Rule import org.junit.Rule

View File

@ -20,7 +20,7 @@ import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.contracts.DummyContract import net.corda.testing.contracts.DummyContract
import net.corda.testing.contracts.DummyState import net.corda.testing.contracts.DummyState
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.Assert.assertFalse import org.junit.Assert.assertFalse

View File

@ -17,7 +17,7 @@ import net.corda.testing.contracts.DummyContract
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.createWireTransaction import net.corda.testing.internal.createWireTransaction
import net.corda.testing.internal.fakeAttachment import net.corda.testing.internal.fakeAttachment
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import java.math.BigInteger import java.math.BigInteger

View File

@ -7,7 +7,7 @@ import net.corda.core.serialization.CordaSerializable
import net.corda.core.serialization.internal.checkpointDeserialize import net.corda.core.serialization.internal.checkpointDeserialize
import net.corda.core.serialization.internal.checkpointSerialize import net.corda.core.serialization.internal.checkpointSerialize
import net.corda.core.utilities.transient import net.corda.core.utilities.transient
import net.corda.node.serialization.kryo.KRYO_CHECKPOINT_CONTEXT import net.corda.nodeapi.internal.serialization.kryo.KRYO_CHECKPOINT_CONTEXT
import net.corda.serialization.internal.CheckpointSerializationContextImpl import net.corda.serialization.internal.CheckpointSerializationContextImpl
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat

View File

@ -82,7 +82,7 @@ dependencies {
testCompile "org.ow2.asm:asm:$asm_version" testCompile "org.ow2.asm:asm:$asm_version"
// JDK11: required by Quasar at run-time // JDK11: required by Quasar at run-time
testRuntimeOnly "com.esotericsoftware:kryo:4.0.2" testRuntimeOnly "com.esotericsoftware:kryo:$kryo_version"
testCompile "com.nhaarman:mockito-kotlin:$mockito_kotlin_version" testCompile "com.nhaarman:mockito-kotlin:$mockito_kotlin_version"
testCompile "org.mockito:mockito-core:$mockito_version" testCompile "org.mockito:mockito-core:$mockito_version"

View File

@ -1198,7 +1198,7 @@
<ID>MagicNumber:X509Utilities.kt$X509Utilities$3650</ID> <ID>MagicNumber:X509Utilities.kt$X509Utilities$3650</ID>
<ID>MagicNumber:errorAndTerminate.kt$10</ID> <ID>MagicNumber:errorAndTerminate.kt$10</ID>
<ID>MatchingDeclarationName:AMQPSerializerFactories.kt$net.corda.serialization.internal.amqp.AMQPSerializerFactories.kt</ID> <ID>MatchingDeclarationName:AMQPSerializerFactories.kt$net.corda.serialization.internal.amqp.AMQPSerializerFactories.kt</ID>
<ID>MatchingDeclarationName:AMQPTestSerialiationScheme.kt$net.corda.node.internal.serialization.testutils.AMQPTestSerialiationScheme.kt</ID> <ID>MatchingDeclarationName:AMQPTestSerialiationScheme.kt$net.corda.nodeapi.internal.serialization.testutils.AMQPTestSerialiationScheme.kt</ID>
<ID>MatchingDeclarationName:AttachmentDemo.kt$net.corda.attachmentdemo.AttachmentDemo.kt</ID> <ID>MatchingDeclarationName:AttachmentDemo.kt$net.corda.attachmentdemo.AttachmentDemo.kt</ID>
<ID>MatchingDeclarationName:AzureRegistryLocator.kt$net.corda.networkbuilder.containers.push.azure.AzureRegistryLocator.kt</ID> <ID>MatchingDeclarationName:AzureRegistryLocator.kt$net.corda.networkbuilder.containers.push.azure.AzureRegistryLocator.kt</ID>
<ID>MatchingDeclarationName:CheckpointSerializationScheme.kt$net.corda.serialization.internal.CheckpointSerializationScheme.kt</ID> <ID>MatchingDeclarationName:CheckpointSerializationScheme.kt$net.corda.serialization.internal.CheckpointSerializationScheme.kt</ID>
@ -2113,7 +2113,7 @@
<ID>WildcardImport:FlowFrameworkTests.kt$import net.corda.testing.node.internal.*</ID> <ID>WildcardImport:FlowFrameworkTests.kt$import net.corda.testing.node.internal.*</ID>
<ID>WildcardImport:FlowFrameworkTripartyTests.kt$import net.corda.testing.node.internal.*</ID> <ID>WildcardImport:FlowFrameworkTripartyTests.kt$import net.corda.testing.node.internal.*</ID>
<ID>WildcardImport:FlowLogicRefFactoryImpl.kt$import net.corda.core.flows.*</ID> <ID>WildcardImport:FlowLogicRefFactoryImpl.kt$import net.corda.core.flows.*</ID>
<ID>WildcardImport:FlowMatchers.kt$import net.corda.testing.internal.matchers.*</ID> <ID>WildcardImport:FlowMatchers.kt$import net.corda.coretesting.internal.matchers.*</ID>
<ID>WildcardImport:FlowOverrideTests.kt$import net.corda.core.flows.*</ID> <ID>WildcardImport:FlowOverrideTests.kt$import net.corda.core.flows.*</ID>
<ID>WildcardImport:FlowRetryTest.kt$import net.corda.core.flows.*</ID> <ID>WildcardImport:FlowRetryTest.kt$import net.corda.core.flows.*</ID>
<ID>WildcardImport:FlowStackSnapshotTest.kt$import net.corda.core.flows.*</ID> <ID>WildcardImport:FlowStackSnapshotTest.kt$import net.corda.core.flows.*</ID>

View File

@ -17,7 +17,6 @@ import net.corda.finance.contracts.ICommercialPaperState
import net.corda.finance.contracts.asset.CASH import net.corda.finance.contracts.asset.CASH
import net.corda.finance.contracts.asset.Cash import net.corda.finance.contracts.asset.Cash
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.rigorousMock
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import net.corda.testing.node.ledger import net.corda.testing.node.ledger
import net.corda.testing.node.transaction import net.corda.testing.node.transaction

View File

@ -22,7 +22,7 @@ import net.corda.testing.core.*
import net.corda.testing.dsl.EnforceVerifyOrFail import net.corda.testing.dsl.EnforceVerifyOrFail
import net.corda.testing.dsl.TransactionDSL import net.corda.testing.dsl.TransactionDSL
import net.corda.testing.dsl.TransactionDSLInterpreter import net.corda.testing.dsl.TransactionDSLInterpreter
import net.corda.testing.internal.TEST_TX_TIME import net.corda.coretesting.internal.TEST_TX_TIME
import net.corda.testing.internal.vault.VaultFiller import net.corda.testing.internal.vault.VaultFiller
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import net.corda.testing.node.MockServices.Companion.makeTestDatabaseAndMockServices import net.corda.testing.node.MockServices.Companion.makeTestDatabaseAndMockServices

View File

@ -24,7 +24,7 @@ import net.corda.finance.workflows.asset.ObligationUtils
import net.corda.testing.contracts.DummyContract import net.corda.testing.contracts.DummyContract
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.dsl.* import net.corda.testing.dsl.*
import net.corda.testing.internal.TEST_TX_TIME import net.corda.coretesting.internal.TEST_TX_TIME
import net.corda.testing.internal.fakeAttachment import net.corda.testing.internal.fakeAttachment
import net.corda.testing.internal.vault.CommodityState import net.corda.testing.internal.vault.CommodityState
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices

View File

@ -30,6 +30,10 @@ dependencies {
// ClassGraph: classpath scanning // ClassGraph: classpath scanning
compile "io.github.classgraph:classgraph:$class_graph_version" compile "io.github.classgraph:classgraph:$class_graph_version"
// Kryo: object graph serialization.
compile "com.esotericsoftware:kryo:$kryo_version"
compile "de.javakaffee:kryo-serializers:$kryo_serializer_version"
// For caches rather than guava // For caches rather than guava
compile "com.github.ben-manes.caffeine:caffeine:$caffeine_version" compile "com.github.ben-manes.caffeine:caffeine:$caffeine_version"
@ -39,7 +43,7 @@ dependencies {
runtime 'com.mattbertolini:liquibase-slf4j:2.0.0' runtime 'com.mattbertolini:liquibase-slf4j:2.0.0'
// JDK11: required by Quasar at run-time // JDK11: required by Quasar at run-time
runtime "com.esotericsoftware:kryo:4.0.2" runtime "com.esotericsoftware:kryo:$kryo_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}"
testImplementation "junit:junit:$junit_version" testImplementation "junit:junit:$junit_version"

View File

@ -1,4 +1,4 @@
package net.corda.node.services.rpc package net.corda.nodeapi.internal.rpc
import com.github.benmanes.caffeine.cache.Cache import com.github.benmanes.caffeine.cache.Cache
import net.corda.core.context.Trace import net.corda.core.context.Trace

View File

@ -0,0 +1,7 @@
package net.corda.nodeapi.internal.rpc
import rx.Subscription
class ObservableSubscription(
val subscription: Subscription
)

View File

@ -1,4 +1,4 @@
package net.corda.client.rpc.internal.serialization.amqp package net.corda.nodeapi.internal.rpc.client
import net.corda.core.cordapp.Cordapp import net.corda.core.cordapp.Cordapp
import net.corda.core.internal.toSynchronised import net.corda.core.internal.toSynchronised
@ -8,9 +8,18 @@ import net.corda.core.serialization.SerializationCustomSerializer
import net.corda.core.serialization.SerializationWhitelist import net.corda.core.serialization.SerializationWhitelist
import net.corda.core.serialization.internal.SerializationEnvironment import net.corda.core.serialization.internal.SerializationEnvironment
import net.corda.core.serialization.internal._rpcClientSerializationEnv import net.corda.core.serialization.internal._rpcClientSerializationEnv
import net.corda.core.serialization.internal.nodeSerializationEnv import net.corda.serialization.internal.AMQP_P2P_CONTEXT
import net.corda.serialization.internal.* import net.corda.serialization.internal.AMQP_RPC_CLIENT_CONTEXT
import net.corda.serialization.internal.amqp.* import net.corda.serialization.internal.AMQP_RPC_SERVER_CONTEXT
import net.corda.serialization.internal.AMQP_STORAGE_CONTEXT
import net.corda.serialization.internal.CordaSerializationMagic
import net.corda.serialization.internal.SerializationFactoryImpl
import net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme
import net.corda.serialization.internal.amqp.AccessOrderLinkedHashMap
import net.corda.serialization.internal.amqp.SerializationFactoryCacheKey
import net.corda.serialization.internal.amqp.SerializerFactory
import net.corda.serialization.internal.amqp.SerializerFactoryBuilder
import net.corda.serialization.internal.amqp.amqpMagic
import net.corda.serialization.internal.amqp.custom.RxNotificationSerializer import net.corda.serialization.internal.amqp.custom.RxNotificationSerializer
/** /**

View File

@ -0,0 +1,27 @@
package net.corda.nodeapi.internal.rpc.client
import com.github.benmanes.caffeine.cache.Cache
import net.corda.core.context.Trace
import rx.Notification
import rx.Observable
import rx.subjects.UnicastSubject
import java.util.concurrent.ConcurrentHashMap
/** A throwable that doesn't represent a real error - it's just here to wrap a stack trace. */
class CallSite(val rpcName: String) : Throwable("<Call site of root RPC '$rpcName'>")
typealias RpcObservableMap = Cache<Trace.InvocationId, UnicastSubject<Notification<*>>>
typealias CallSiteMap = ConcurrentHashMap<Trace.InvocationId, CallSite?>
/**
* Holds a context available during de-serialisation of messages that are expected to contain Observables.
*
* @property observableMap holds the Observables that are ultimately exposed to the user.
* @property hardReferenceStore holds references to Observables we want to keep alive while they are subscribed to.
* @property callSiteMap keeps stack traces captured when an RPC was invoked, useful for debugging when an observable leaks.
*/
data class ObservableContext(
val callSiteMap: CallSiteMap?,
val observableMap: RpcObservableMap,
val hardReferenceStore: MutableSet<Observable<*>>
)

View File

@ -1,4 +1,4 @@
package net.corda.client.rpc.internal.serialization.amqp package net.corda.nodeapi.internal.rpc.client
import net.corda.core.concurrent.CordaFuture import net.corda.core.concurrent.CordaFuture
import net.corda.core.toFuture import net.corda.core.toFuture
@ -14,7 +14,7 @@ import java.io.NotSerializableException
class RpcClientCordaFutureSerializer (factory: SerializerFactory) class RpcClientCordaFutureSerializer (factory: SerializerFactory)
: CustomSerializer.Proxy<CordaFuture<*>, RpcClientCordaFutureSerializer.FutureProxy>( : CustomSerializer.Proxy<CordaFuture<*>, RpcClientCordaFutureSerializer.FutureProxy>(
CordaFuture::class.java, CordaFuture::class.java,
RpcClientCordaFutureSerializer.FutureProxy::class.java, factory FutureProxy::class.java, factory
) { ) {
override fun fromProxy(proxy: FutureProxy): CordaFuture<*> { override fun fromProxy(proxy: FutureProxy): CordaFuture<*> {
try { try {

View File

@ -1,8 +1,6 @@
package net.corda.client.rpc.internal.serialization.amqp package net.corda.nodeapi.internal.rpc.client
import net.corda.client.rpc.internal.ObservableContext
import net.corda.client.rpc.internal.RPCClientProxyHandler
import net.corda.core.context.Trace import net.corda.core.context.Trace
import net.corda.core.serialization.SerializationContext import net.corda.core.serialization.SerializationContext
import net.corda.core.utilities.loggerFor import net.corda.core.utilities.loggerFor
@ -86,7 +84,7 @@ object RpcClientObservableDeSerializer : CustomSerializer.Implements<Observable<
} }
val observableContext = val observableContext =
context.properties[RpcClientObservableDeSerializer.RpcObservableContextKey] as ObservableContext context.properties[RpcObservableContextKey] as ObservableContext
if (obj !is List<*>) throw NotSerializableException("Input must be a serialised list") if (obj !is List<*>) throw NotSerializableException("Input must be a serialised list")
if (obj.size != 2) throw NotSerializableException("Expecting two elements, have ${obj.size}") if (obj.size != 2) throw NotSerializableException("Expecting two elements, have ${obj.size}")
@ -105,7 +103,8 @@ object RpcClientObservableDeSerializer : CustomSerializer.Implements<Observable<
// We pin all Observables into a hard reference store (rooted in the RPC proxy) on subscription so that users // We pin all Observables into a hard reference store (rooted in the RPC proxy) on subscription so that users
// don't need to store a reference to the Observables themselves. // don't need to store a reference to the Observables themselves.
return pinInSubscriptions(observable, observableContext.hardReferenceStore).doOnUnsubscribe { return pinInSubscriptions(observable, observableContext.hardReferenceStore)
.doOnUnsubscribe {
// This causes Future completions to give warnings because the corresponding OnComplete sent from the server // This causes Future completions to give warnings because the corresponding OnComplete sent from the server
// will arrive after the client unsubscribes from the observable and consequently invalidates the mapping. // will arrive after the client unsubscribes from the observable and consequently invalidates the mapping.
// The unsubscribe is due to ObservableToFuture's use of first(). // The unsubscribe is due to ObservableToFuture's use of first().
@ -113,7 +112,7 @@ object RpcClientObservableDeSerializer : CustomSerializer.Implements<Observable<
}.dematerialize<Any>() }.dematerialize<Any>()
} }
private fun getRpcCallSite(context: SerializationContext, observableContext: ObservableContext): RPCClientProxyHandler.CallSite? { private fun getRpcCallSite(context: SerializationContext, observableContext: ObservableContext): CallSite? {
val rpcRequestOrObservableId = context.properties[RPCApi.RpcRequestOrObservableIdKey] as Trace.InvocationId val rpcRequestOrObservableId = context.properties[RPCApi.RpcRequestOrObservableIdKey] as Trace.InvocationId
// Will only return non-null if the trackRpcCallSites option in the RPC configuration has been specified. // Will only return non-null if the trackRpcCallSites option in the RPC configuration has been specified.
return observableContext.callSiteMap?.get(rpcRequestOrObservableId) return observableContext.callSiteMap?.get(rpcRequestOrObservableId)

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.amqp package net.corda.nodeapi.internal.serialization.amqp
import net.corda.core.cordapp.Cordapp import net.corda.core.cordapp.Cordapp
import net.corda.core.internal.toSynchronised import net.corda.core.internal.toSynchronised

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.amqp package net.corda.nodeapi.internal.serialization.amqp
import net.corda.core.concurrent.CordaFuture import net.corda.core.concurrent.CordaFuture
import net.corda.core.toObservable import net.corda.core.toObservable
@ -14,13 +14,13 @@ import java.io.NotSerializableException
class RpcServerCordaFutureSerializer(factory: SerializerFactory) class RpcServerCordaFutureSerializer(factory: SerializerFactory)
: CustomSerializer.Proxy<CordaFuture<*>, : CustomSerializer.Proxy<CordaFuture<*>,
RpcServerCordaFutureSerializer.FutureProxy>( RpcServerCordaFutureSerializer.FutureProxy>(
CordaFuture::class.java, RpcServerCordaFutureSerializer.FutureProxy::class.java, factory CordaFuture::class.java, FutureProxy::class.java, factory
) { ) {
override fun fromProxy(proxy: RpcServerCordaFutureSerializer.FutureProxy): CordaFuture<*> { override fun fromProxy(proxy: FutureProxy): CordaFuture<*> {
throw UnsupportedOperationException() throw UnsupportedOperationException()
} }
override fun toProxy(obj: CordaFuture<*>): RpcServerCordaFutureSerializer.FutureProxy { override fun toProxy(obj: CordaFuture<*>): FutureProxy {
try { try {
return FutureProxy(obj.toObservable()) return FutureProxy(obj.toObservable())
} catch (e: NotSerializableException) { } catch (e: NotSerializableException) {

View File

@ -1,12 +1,12 @@
package net.corda.node.serialization.amqp package net.corda.nodeapi.internal.serialization.amqp
import net.corda.core.context.Trace import net.corda.core.context.Trace
import net.corda.core.serialization.SerializationContext import net.corda.core.serialization.SerializationContext
import net.corda.core.utilities.contextLogger import net.corda.core.utilities.contextLogger
import net.corda.core.utilities.loggerFor import net.corda.core.utilities.loggerFor
import net.corda.node.services.rpc.ObservableContextInterface
import net.corda.node.services.rpc.ObservableSubscription
import net.corda.nodeapi.RPCApi import net.corda.nodeapi.RPCApi
import net.corda.nodeapi.internal.rpc.ObservableContextInterface
import net.corda.nodeapi.internal.rpc.ObservableSubscription
import net.corda.serialization.internal.amqp.* import net.corda.serialization.internal.amqp.*
import org.apache.qpid.proton.codec.Data import org.apache.qpid.proton.codec.Data
import rx.Notification import rx.Notification
@ -31,7 +31,7 @@ class RpcServerObservableSerializer : CustomSerializer.Implements<Observable<*>>
fun createContext( fun createContext(
serializationContext: SerializationContext, serializationContext: SerializationContext,
observableContext: ObservableContextInterface observableContext: ObservableContextInterface
) = serializationContext.withProperty(RpcServerObservableSerializer.RpcObservableContextKey, observableContext) ) = serializationContext.withProperty(RpcObservableContextKey, observableContext)
val log = contextLogger() val log = contextLogger()
} }
@ -80,11 +80,11 @@ class RpcServerObservableSerializer : CustomSerializer.Implements<Observable<*>>
context: SerializationContext context: SerializationContext
) { ) {
val observableId = Trace.InvocationId.newInstance() val observableId = Trace.InvocationId.newInstance()
if (RpcServerObservableSerializer.RpcObservableContextKey !in context.properties) { if (RpcObservableContextKey !in context.properties) {
throw NotSerializableException("Missing Observable Key on serialization context - $type") throw NotSerializableException("Missing Observable Key on serialization context - $type")
} }
val observableContext = context.properties[RpcServerObservableSerializer.RpcObservableContextKey] val observableContext = context.properties[RpcObservableContextKey]
as ObservableContextInterface as ObservableContextInterface
data.withList { data.withList {

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import com.esotericsoftware.kryo.* import com.esotericsoftware.kryo.*
import com.esotericsoftware.kryo.io.Input import com.esotericsoftware.kryo.io.Input

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.io.Output import com.esotericsoftware.kryo.io.Output

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.Serializer import com.esotericsoftware.kryo.Serializer

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import com.esotericsoftware.kryo.* import com.esotericsoftware.kryo.*
import com.esotericsoftware.kryo.factories.ReflectionSerializerFactory import com.esotericsoftware.kryo.factories.ReflectionSerializerFactory

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import co.paralleluniverse.fibers.Fiber import co.paralleluniverse.fibers.Fiber
import co.paralleluniverse.io.serialization.kryo.KryoSerializer import co.paralleluniverse.io.serialization.kryo.KryoSerializer

View File

@ -1,6 +1,6 @@
@file:JvmName("KryoStreams") @file:JvmName("KryoStreams")
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import com.esotericsoftware.kryo.io.Input import com.esotericsoftware.kryo.io.Input
import com.esotericsoftware.kryo.io.Output import com.esotericsoftware.kryo.io.Output

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.KryoException import com.esotericsoftware.kryo.KryoException

View File

@ -25,7 +25,7 @@ import net.corda.testing.core.DUMMY_NOTARY_NAME
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.internal.MockCordappConfigProvider import net.corda.testing.internal.MockCordappConfigProvider
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.internal.cordappWithPackages import net.corda.testing.node.internal.cordappWithPackages
import net.corda.testing.services.MockAttachmentStorage import net.corda.testing.services.MockAttachmentStorage
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat

View File

@ -11,8 +11,8 @@ import net.corda.nodeapi.internal.crypto.X509Utilities
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.BOB_NAME import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.internal.TestNodeInfoBuilder import net.corda.coretesting.internal.TestNodeInfoBuilder
import net.corda.testing.internal.signWith import net.corda.coretesting.internal.signWith
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.Rule import org.junit.Rule

View File

@ -1,7 +1,7 @@
package net.corda.nodeapi.internal.crypto package net.corda.nodeapi.internal.crypto
import net.corda.core.crypto.internal.AliasPrivateKey import net.corda.core.crypto.internal.AliasPrivateKey
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.rules.TemporaryFolder import org.junit.rules.TemporaryFolder

View File

@ -21,7 +21,7 @@ import net.corda.core.serialization.deserialize
import net.corda.core.serialization.serialize import net.corda.core.serialization.serialize
import net.corda.core.utilities.days import net.corda.core.utilities.days
import net.corda.core.utilities.hours import net.corda.core.utilities.hours
import net.corda.node.serialization.amqp.AMQPServerSerializationScheme import net.corda.nodeapi.internal.serialization.amqp.AMQPServerSerializationScheme
import net.corda.nodeapi.internal.config.MutualSslConfiguration import net.corda.nodeapi.internal.config.MutualSslConfiguration
import net.corda.nodeapi.internal.createDevNodeCa import net.corda.nodeapi.internal.createDevNodeCa
import net.corda.nodeapi.internal.crypto.X509Utilities.DEFAULT_IDENTITY_SIGNATURE_SCHEME import net.corda.nodeapi.internal.crypto.X509Utilities.DEFAULT_IDENTITY_SIGNATURE_SCHEME
@ -37,11 +37,11 @@ import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.BOB_NAME import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.driver.internal.incrementalPortAllocation import net.corda.testing.driver.internal.incrementalPortAllocation
import net.corda.testing.internal.NettyTestClient import net.corda.coretesting.internal.NettyTestClient
import net.corda.testing.internal.NettyTestHandler import net.corda.coretesting.internal.NettyTestHandler
import net.corda.testing.internal.NettyTestServer import net.corda.coretesting.internal.NettyTestServer
import net.corda.testing.internal.createDevIntermediateCaCertPath import net.corda.testing.internal.createDevIntermediateCaCertPath
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import net.i2p.crypto.eddsa.EdDSAPrivateKey import net.i2p.crypto.eddsa.EdDSAPrivateKey
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.bouncycastle.asn1.x509.* import org.bouncycastle.asn1.x509.*

View File

@ -12,7 +12,7 @@ import net.corda.nodeapi.internal.cryptoservice.CryptoServiceException
import net.corda.nodeapi.internal.cryptoservice.WrappedPrivateKey import net.corda.nodeapi.internal.cryptoservice.WrappedPrivateKey
import net.corda.nodeapi.internal.cryptoservice.WrappingMode import net.corda.nodeapi.internal.cryptoservice.WrappingMode
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.Assertions.assertThatThrownBy
import org.bouncycastle.jce.provider.BouncyCastleProvider import org.bouncycastle.jce.provider.BouncyCastleProvider

View File

@ -18,8 +18,12 @@ import net.corda.nodeapi.internal.config.toConfig
import net.corda.nodeapi.internal.network.NetworkBootstrapper.Companion.DEFAULT_MAX_MESSAGE_SIZE import net.corda.nodeapi.internal.network.NetworkBootstrapper.Companion.DEFAULT_MAX_MESSAGE_SIZE
import net.corda.nodeapi.internal.network.NetworkBootstrapper.Companion.DEFAULT_MAX_TRANSACTION_SIZE import net.corda.nodeapi.internal.network.NetworkBootstrapper.Companion.DEFAULT_MAX_TRANSACTION_SIZE
import net.corda.nodeapi.internal.network.NodeInfoFilesCopier.Companion.NODE_INFO_FILE_NAME_PREFIX import net.corda.nodeapi.internal.network.NodeInfoFilesCopier.Companion.NODE_INFO_FILE_NAME_PREFIX
import net.corda.testing.core.* import net.corda.testing.core.ALICE_NAME
import net.corda.testing.internal.createNodeInfoAndSigned import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.DUMMY_NOTARY_NAME
import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.core.TestIdentity
import net.corda.coretesting.internal.createNodeInfoAndSigned
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.After import org.junit.After

View File

@ -1,19 +1,19 @@
package net.corda.node.internal.serialization package net.corda.nodeapi.internal.serialization
import co.paralleluniverse.common.util.SameThreadExecutor import co.paralleluniverse.common.util.SameThreadExecutor
import com.github.benmanes.caffeine.cache.Cache import com.github.benmanes.caffeine.cache.Cache
import com.github.benmanes.caffeine.cache.Caffeine import com.github.benmanes.caffeine.cache.Caffeine
import com.github.benmanes.caffeine.cache.RemovalListener import com.github.benmanes.caffeine.cache.RemovalListener
import com.nhaarman.mockito_kotlin.mock import com.nhaarman.mockito_kotlin.mock
import net.corda.client.rpc.internal.serialization.amqp.RpcClientObservableDeSerializer import net.corda.nodeapi.internal.rpc.client.RpcClientObservableDeSerializer
import net.corda.core.context.Trace import net.corda.core.context.Trace
import net.corda.core.internal.ThreadBox import net.corda.core.internal.ThreadBox
import net.corda.core.internal.toSynchronised import net.corda.core.internal.toSynchronised
import net.corda.node.internal.serialization.testutils.AMQPRoundTripRPCSerializationScheme import net.corda.nodeapi.internal.serialization.testutils.AMQPRoundTripRPCSerializationScheme
import net.corda.node.internal.serialization.testutils.serializationContext import net.corda.nodeapi.internal.serialization.testutils.serializationContext
import net.corda.node.serialization.amqp.RpcServerObservableSerializer import net.corda.nodeapi.internal.serialization.amqp.RpcServerObservableSerializer
import net.corda.node.services.rpc.ObservableSubscription
import net.corda.nodeapi.RPCApi import net.corda.nodeapi.RPCApi
import net.corda.nodeapi.internal.rpc.ObservableSubscription
import net.corda.serialization.internal.amqp.* import net.corda.serialization.internal.amqp.*
import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.api.core.SimpleString
import org.junit.Test import org.junit.Test
@ -24,8 +24,8 @@ import java.time.Instant
import java.util.* import java.util.*
import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import net.corda.client.rpc.internal.ObservableContext as ClientObservableContext import net.corda.nodeapi.internal.rpc.client.ObservableContext as ClientObservableContext
import net.corda.node.internal.serialization.testutils.TestObservableContext as ServerObservableContext import net.corda.nodeapi.internal.serialization.testutils.TestObservableContext as ServerObservableContext
class RoundTripObservableSerializerTests { class RoundTripObservableSerializerTests {
private fun getID() = Trace.InvocationId("test1", Instant.now()) private fun getID() = Trace.InvocationId("test1", Instant.now())

View File

@ -1,13 +1,13 @@
package net.corda.node.internal.serialization package net.corda.nodeapi.internal.serialization
import com.github.benmanes.caffeine.cache.Cache import com.github.benmanes.caffeine.cache.Cache
import com.github.benmanes.caffeine.cache.Caffeine import com.github.benmanes.caffeine.cache.Caffeine
import com.nhaarman.mockito_kotlin.mock import com.nhaarman.mockito_kotlin.mock
import net.corda.core.context.Trace import net.corda.core.context.Trace
import net.corda.node.internal.serialization.testutils.TestObservableContext import net.corda.nodeapi.internal.serialization.testutils.TestObservableContext
import net.corda.node.internal.serialization.testutils.serializationContext import net.corda.nodeapi.internal.serialization.testutils.serializationContext
import net.corda.node.serialization.amqp.RpcServerObservableSerializer import net.corda.nodeapi.internal.rpc.ObservableSubscription
import net.corda.node.services.rpc.ObservableSubscription import net.corda.nodeapi.internal.serialization.amqp.RpcServerObservableSerializer
import net.corda.serialization.internal.AllWhitelist import net.corda.serialization.internal.AllWhitelist
import net.corda.serialization.internal.amqp.SerializationOutput import net.corda.serialization.internal.amqp.SerializationOutput
import net.corda.serialization.internal.amqp.SerializerFactoryBuilder import net.corda.serialization.internal.amqp.SerializerFactoryBuilder

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import net.corda.core.internal.declaredField import net.corda.core.internal.declaredField
import net.corda.serialization.internal.ByteBufferOutputStream import net.corda.serialization.internal.ByteBufferOutputStream

View File

@ -1,4 +1,4 @@
package net.corda.node.serialization.kryo package net.corda.nodeapi.internal.serialization.kryo
import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.KryoException import com.esotericsoftware.kryo.KryoException
@ -23,7 +23,7 @@ import net.corda.serialization.internal.*
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import org.apache.commons.lang3.SystemUtils import org.apache.commons.lang3.SystemUtils
import org.assertj.core.api.Assertions.* import org.assertj.core.api.Assertions.*
import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertArrayEquals
@ -356,9 +356,9 @@ class KryoTests(private val compression: CordaSerializationEncoding?) {
val compressedSize = obj.checkpointSerialize(context.withEncoding(CordaSerializationEncoding.SNAPPY)).size val compressedSize = obj.checkpointSerialize(context.withEncoding(CordaSerializationEncoding.SNAPPY)).size
// If these need fixing, sounds like Kryo wire format changed and checkpoints might not survive an upgrade. // If these need fixing, sounds like Kryo wire format changed and checkpoints might not survive an upgrade.
if (SystemUtils.IS_JAVA_11) if (SystemUtils.IS_JAVA_11)
assertEquals(20172, uncompressedSize) assertEquals(20184, uncompressedSize)
else else
assertEquals(20222, uncompressedSize) assertEquals(20234, uncompressedSize)
assertEquals(1111, compressedSize) assertEquals(1123, compressedSize)
} }
} }

View File

@ -1,16 +1,16 @@
package net.corda.node.internal.serialization.testutils package net.corda.nodeapi.internal.serialization.testutils
import net.corda.client.rpc.internal.serialization.amqp.RpcClientObservableDeSerializer import net.corda.nodeapi.internal.rpc.client.RpcClientObservableDeSerializer
import net.corda.core.context.Trace import net.corda.core.context.Trace
import net.corda.core.serialization.SerializationContext import net.corda.core.serialization.SerializationContext
import net.corda.core.serialization.SerializationCustomSerializer import net.corda.core.serialization.SerializationCustomSerializer
import net.corda.core.serialization.SerializationWhitelist import net.corda.core.serialization.SerializationWhitelist
import net.corda.node.serialization.amqp.RpcServerObservableSerializer import net.corda.nodeapi.internal.serialization.amqp.RpcServerObservableSerializer
import net.corda.nodeapi.RPCApi import net.corda.nodeapi.RPCApi
import net.corda.serialization.internal.CordaSerializationMagic import net.corda.serialization.internal.CordaSerializationMagic
import net.corda.serialization.internal.AllWhitelist import net.corda.serialization.internal.AllWhitelist
import net.corda.serialization.internal.amqp.* import net.corda.serialization.internal.amqp.*
import net.corda.client.rpc.internal.ObservableContext as ClientObservableContext import net.corda.nodeapi.internal.rpc.client.ObservableContext as ClientObservableContext
/** /**
* Special serialization context for the round trip tests that allows for both server and client RPC * Special serialization context for the round trip tests that allows for both server and client RPC

View File

@ -1,10 +1,10 @@
package net.corda.node.internal.serialization.testutils package net.corda.nodeapi.internal.serialization.testutils
import com.github.benmanes.caffeine.cache.Cache import com.github.benmanes.caffeine.cache.Cache
import net.corda.core.context.Trace import net.corda.core.context.Trace
import net.corda.node.services.rpc.ObservableContextInterface import net.corda.nodeapi.internal.rpc.ObservableContextInterface
import net.corda.node.services.rpc.ObservableSubscription
import net.corda.nodeapi.RPCApi import net.corda.nodeapi.RPCApi
import net.corda.nodeapi.internal.rpc.ObservableSubscription
import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.api.core.SimpleString
import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.ConcurrentHashMap

View File

@ -1,4 +1,4 @@
package net.corda.node.internal.serialization.testutils package net.corda.nodeapi.internal.serialization.testutils
import net.corda.core.serialization.SerializationContext import net.corda.core.serialization.SerializationContext
import net.corda.serialization.internal.AllWhitelist import net.corda.serialization.internal.AllWhitelist

View File

@ -109,10 +109,6 @@ dependencies {
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
// Kryo: object graph serialization.
compile "com.esotericsoftware:kryo:4.0.2"
compile "de.javakaffee:kryo-serializers:0.43"
compile "com.google.guava:guava:$guava_version" compile "com.google.guava:guava:$guava_version"
// For caches rather than guava // For caches rather than guava

View File

@ -16,7 +16,7 @@ import net.corda.nodeapi.internal.crypto.X509Utilities.CORDA_ROOT_CA
import net.corda.testing.common.internal.testNetworkParameters import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.driver.internal.incrementalPortAllocation import net.corda.testing.driver.internal.incrementalPortAllocation
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.coretesting.internal.DEV_ROOT_CA
import net.corda.testing.node.NotarySpec import net.corda.testing.node.NotarySpec
import net.corda.testing.node.internal.SharedCompatibilityZoneParams import net.corda.testing.node.internal.SharedCompatibilityZoneParams
import net.corda.testing.node.internal.internalDriver import net.corda.testing.node.internal.internalDriver

View File

@ -18,7 +18,7 @@ import net.corda.testing.driver.DriverParameters
import net.corda.testing.driver.NodeHandle import net.corda.testing.driver.NodeHandle
import net.corda.testing.driver.NodeParameters import net.corda.testing.driver.NodeParameters
import net.corda.testing.driver.driver import net.corda.testing.driver.driver
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import net.corda.testing.node.User import net.corda.testing.node.User
import net.corda.testing.node.internal.enclosedCordapp import net.corda.testing.node.internal.enclosedCordapp
import net.corda.testing.node.internal.startNode import net.corda.testing.node.internal.startNode

View File

@ -13,6 +13,7 @@ import net.corda.core.node.services.Vault
import net.corda.core.node.services.vault.QueryCriteria import net.corda.core.node.services.vault.QueryCriteria
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.getOrThrow
import net.corda.coretesting.internal.DEV_ROOT_CA
import net.corda.finance.DOLLARS import net.corda.finance.DOLLARS
import net.corda.finance.contracts.asset.Cash import net.corda.finance.contracts.asset.Cash
import net.corda.finance.flows.CashIssueFlow import net.corda.finance.flows.CashIssueFlow
@ -26,7 +27,6 @@ import net.corda.testing.core.*
import net.corda.testing.core.internal.JarSignatureTestUtils.generateKey import net.corda.testing.core.internal.JarSignatureTestUtils.generateKey
import net.corda.testing.core.internal.SelfCleaningDir import net.corda.testing.core.internal.SelfCleaningDir
import net.corda.testing.driver.* import net.corda.testing.driver.*
import net.corda.testing.internal.DEV_ROOT_CA
import net.corda.testing.node.NotarySpec import net.corda.testing.node.NotarySpec
import net.corda.testing.node.User import net.corda.testing.node.User
import net.corda.testing.node.internal.cordappWithPackages import net.corda.testing.node.internal.cordappWithPackages

View File

@ -9,7 +9,7 @@ import net.corda.nodeapi.internal.crypto.X509Utilities
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.driver.DriverParameters import net.corda.testing.driver.DriverParameters
import net.corda.testing.driver.driver import net.corda.testing.driver.driver
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.Test import org.junit.Test
import javax.security.auth.x500.X500Principal import javax.security.auth.x500.X500Principal

View File

@ -19,7 +19,7 @@ import net.corda.testing.driver.DriverParameters
import net.corda.testing.driver.InProcess import net.corda.testing.driver.InProcess
import net.corda.testing.driver.driver import net.corda.testing.driver.driver
import net.corda.testing.driver.internal.internalServices import net.corda.testing.driver.internal.internalServices
import net.corda.testing.internal.performance.div import net.corda.coretesting.internal.performance.div
import net.corda.testing.node.NotarySpec import net.corda.testing.node.NotarySpec
import net.corda.testing.node.User import net.corda.testing.node.User
import net.corda.testing.node.internal.FINANCE_CORDAPPS import net.corda.testing.node.internal.FINANCE_CORDAPPS

View File

@ -20,8 +20,8 @@ import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.MAX_MESSAGE_SIZE import net.corda.testing.core.MAX_MESSAGE_SIZE
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.driver.internal.incrementalPortAllocation import net.corda.testing.driver.internal.incrementalPortAllocation
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import org.apache.activemq.artemis.api.core.Message.HDR_DUPLICATE_DETECTION_ID import org.apache.activemq.artemis.api.core.Message.HDR_DUPLICATE_DETECTION_ID
import org.apache.activemq.artemis.api.core.RoutingType import org.apache.activemq.artemis.api.core.RoutingType
import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.api.core.SimpleString

View File

@ -25,10 +25,10 @@ import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.CHARLIE_NAME import net.corda.testing.core.CHARLIE_NAME
import net.corda.testing.core.MAX_MESSAGE_SIZE import net.corda.testing.core.MAX_MESSAGE_SIZE
import net.corda.testing.driver.internal.incrementalPortAllocation import net.corda.testing.driver.internal.incrementalPortAllocation
import net.corda.testing.internal.DEV_INTERMEDIATE_CA import net.corda.coretesting.internal.DEV_INTERMEDIATE_CA
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.coretesting.internal.DEV_ROOT_CA
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import org.assertj.core.api.Assertions.assertThatIllegalArgumentException import org.assertj.core.api.Assertions.assertThatIllegalArgumentException
import org.bouncycastle.asn1.x500.X500Name import org.bouncycastle.asn1.x500.X500Name
import org.bouncycastle.asn1.x509.* import org.bouncycastle.asn1.x509.*

View File

@ -30,8 +30,8 @@ import net.corda.testing.core.CHARLIE_NAME
import net.corda.testing.core.MAX_MESSAGE_SIZE import net.corda.testing.core.MAX_MESSAGE_SIZE
import net.corda.testing.driver.internal.incrementalPortAllocation import net.corda.testing.driver.internal.incrementalPortAllocation
import net.corda.testing.internal.createDevIntermediateCaCertPath import net.corda.testing.internal.createDevIntermediateCaCertPath
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import org.apache.activemq.artemis.api.core.RoutingType import org.apache.activemq.artemis.api.core.RoutingType
import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertArrayEquals

View File

@ -22,8 +22,8 @@ import net.corda.testing.driver.internal.incrementalPortAllocation
import net.corda.testing.internal.LogHelper import net.corda.testing.internal.LogHelper
import net.corda.testing.internal.TestingNamedCacheFactory import net.corda.testing.internal.TestingNamedCacheFactory
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties
import net.corda.testing.node.internal.MOCK_VERSION_INFO import net.corda.testing.node.internal.MOCK_VERSION_INFO
import org.apache.activemq.artemis.api.core.ActiveMQConnectionTimedOutException import org.apache.activemq.artemis.api.core.ActiveMQConnectionTimedOutException

View File

@ -13,7 +13,7 @@ import net.corda.nodeapi.internal.DEV_ROOT_CA
import net.corda.nodeapi.internal.crypto.CertificateType import net.corda.nodeapi.internal.crypto.CertificateType
import net.corda.nodeapi.internal.crypto.X509Utilities import net.corda.nodeapi.internal.crypto.X509Utilities
import net.corda.nodeapi.internal.loadDevCaTrustStore import net.corda.nodeapi.internal.loadDevCaTrustStore
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration
import org.apache.activemq.artemis.api.core.ActiveMQClusterSecurityException import org.apache.activemq.artemis.api.core.ActiveMQClusterSecurityException
import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException

View File

@ -8,7 +8,7 @@ import com.jcabi.manifests.Manifests
import com.palominolabs.metrics.newrelic.AllEnabledMetricAttributeFilter import com.palominolabs.metrics.newrelic.AllEnabledMetricAttributeFilter
import com.palominolabs.metrics.newrelic.NewRelicReporter import com.palominolabs.metrics.newrelic.NewRelicReporter
import io.netty.util.NettyRuntime import io.netty.util.NettyRuntime
import net.corda.client.rpc.internal.serialization.amqp.AMQPClientSerializationScheme import net.corda.nodeapi.internal.rpc.client.AMQPClientSerializationScheme
import net.corda.cliutils.ShellConstants import net.corda.cliutils.ShellConstants
import net.corda.core.concurrent.CordaFuture import net.corda.core.concurrent.CordaFuture
import net.corda.core.flows.FlowLogic import net.corda.core.flows.FlowLogic
@ -44,9 +44,9 @@ import net.corda.node.internal.artemis.BrokerAddresses
import net.corda.node.internal.security.RPCSecurityManager import net.corda.node.internal.security.RPCSecurityManager
import net.corda.node.internal.security.RPCSecurityManagerImpl import net.corda.node.internal.security.RPCSecurityManagerImpl
import net.corda.node.internal.security.RPCSecurityManagerWithAdditionalUser import net.corda.node.internal.security.RPCSecurityManagerWithAdditionalUser
import net.corda.node.serialization.amqp.AMQPServerSerializationScheme import net.corda.nodeapi.internal.serialization.amqp.AMQPServerSerializationScheme
import net.corda.node.serialization.kryo.KRYO_CHECKPOINT_CONTEXT import net.corda.nodeapi.internal.serialization.kryo.KRYO_CHECKPOINT_CONTEXT
import net.corda.node.serialization.kryo.KryoCheckpointSerializer import net.corda.nodeapi.internal.serialization.kryo.KryoCheckpointSerializer
import net.corda.node.services.Permissions import net.corda.node.services.Permissions
import net.corda.node.services.api.FlowStarter import net.corda.node.services.api.FlowStarter
import net.corda.node.services.api.ServiceHubInternal import net.corda.node.services.api.ServiceHubInternal

View File

@ -21,10 +21,14 @@ import net.corda.core.serialization.SerializationContext
import net.corda.core.serialization.SerializationDefaults import net.corda.core.serialization.SerializationDefaults
import net.corda.core.serialization.SerializationDefaults.RPC_SERVER_CONTEXT import net.corda.core.serialization.SerializationDefaults.RPC_SERVER_CONTEXT
import net.corda.core.serialization.deserialize import net.corda.core.serialization.deserialize
import net.corda.core.utilities.* import net.corda.core.utilities.Try
import net.corda.core.utilities.contextLogger
import net.corda.core.utilities.days
import net.corda.core.utilities.debug
import net.corda.core.utilities.seconds
import net.corda.core.utilities.trace
import net.corda.node.internal.security.AuthorizingSubject import net.corda.node.internal.security.AuthorizingSubject
import net.corda.node.internal.security.RPCSecurityManager import net.corda.node.internal.security.RPCSecurityManager
import net.corda.node.serialization.amqp.RpcServerObservableSerializer
import net.corda.node.services.logging.pushToLoggingContext import net.corda.node.services.logging.pushToLoggingContext
import net.corda.nodeapi.RPCApi import net.corda.nodeapi.RPCApi
import net.corda.nodeapi.RPCApi.CLASS_METHOD_DIVIDER import net.corda.nodeapi.RPCApi.CLASS_METHOD_DIVIDER
@ -34,20 +38,32 @@ import net.corda.nodeapi.internal.DeduplicationChecker
import net.corda.nodeapi.internal.persistence.CordaPersistence import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.nodeapi.internal.persistence.contextDatabase import net.corda.nodeapi.internal.persistence.contextDatabase
import net.corda.nodeapi.internal.persistence.contextDatabaseOrNull import net.corda.nodeapi.internal.persistence.contextDatabaseOrNull
import net.corda.nodeapi.internal.rpc.ObservableContextInterface
import net.corda.nodeapi.internal.rpc.ObservableSubscription
import net.corda.nodeapi.internal.serialization.amqp.RpcServerObservableSerializer
import org.apache.activemq.artemis.api.core.Message import org.apache.activemq.artemis.api.core.Message
import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.api.core.SimpleString
import org.apache.activemq.artemis.api.core.client.*
import org.apache.activemq.artemis.api.core.client.ActiveMQClient.DEFAULT_ACK_BATCH_SIZE import org.apache.activemq.artemis.api.core.client.ActiveMQClient.DEFAULT_ACK_BATCH_SIZE
import org.apache.activemq.artemis.api.core.client.ClientConsumer
import org.apache.activemq.artemis.api.core.client.ClientMessage
import org.apache.activemq.artemis.api.core.client.ClientProducer
import org.apache.activemq.artemis.api.core.client.ClientSession
import org.apache.activemq.artemis.api.core.client.ClientSessionFactory
import org.apache.activemq.artemis.api.core.client.ServerLocator
import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl
import org.apache.activemq.artemis.api.core.management.CoreNotificationType import org.apache.activemq.artemis.api.core.management.CoreNotificationType
import org.apache.activemq.artemis.api.core.management.ManagementHelper import org.apache.activemq.artemis.api.core.management.ManagementHelper
import org.slf4j.MDC import org.slf4j.MDC
import rx.Subscription
import java.lang.reflect.InvocationTargetException import java.lang.reflect.InvocationTargetException
import java.lang.reflect.Method import java.lang.reflect.Method
import java.time.Duration import java.time.Duration
import java.util.* import java.util.*
import java.util.concurrent.* import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.Executors
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.ScheduledExecutorService
import java.util.concurrent.ScheduledFuture
import java.util.concurrent.TimeUnit
import kotlin.concurrent.thread import kotlin.concurrent.thread
private typealias ObservableSubscriptionMap = Cache<InvocationId, ObservableSubscription> private typealias ObservableSubscriptionMap = Cache<InvocationId, ObservableSubscription>
@ -546,9 +562,3 @@ internal fun context(): InvocationContext = rpcContext().invocation
* The [RpcAuthContext] includes permissions. * The [RpcAuthContext] includes permissions.
*/ */
fun rpcContext(): RpcAuthContext = CURRENT_RPC_CONTEXT.get() fun rpcContext(): RpcAuthContext = CURRENT_RPC_CONTEXT.get()
class ObservableSubscription(
val subscription: Subscription
)

View File

@ -21,8 +21,8 @@ import net.corda.nodeapi.internal.persistence.DatabaseConfig
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.internal.createNodeInfoAndSigned import net.corda.coretesting.internal.createNodeInfoAndSigned
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties
import org.apache.commons.lang3.SystemUtils import org.apache.commons.lang3.SystemUtils
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat

View File

@ -25,6 +25,7 @@ import net.corda.core.utilities.days
import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.getOrThrow
import net.corda.core.utilities.toNonEmptySet import net.corda.core.utilities.toNonEmptySet
import net.corda.core.utilities.unwrap import net.corda.core.utilities.unwrap
import net.corda.coretesting.internal.TEST_TX_TIME
import net.corda.finance.DOLLARS import net.corda.finance.DOLLARS
import net.corda.finance.`issued by` import net.corda.finance.`issued by`
import net.corda.finance.contracts.CommercialPaper import net.corda.finance.contracts.CommercialPaper
@ -41,7 +42,6 @@ import net.corda.testing.dsl.LedgerDSL
import net.corda.testing.dsl.TestLedgerDSLInterpreter import net.corda.testing.dsl.TestLedgerDSLInterpreter
import net.corda.testing.dsl.TestTransactionDSLInterpreter import net.corda.testing.dsl.TestTransactionDSLInterpreter
import net.corda.testing.internal.LogHelper import net.corda.testing.internal.LogHelper
import net.corda.testing.internal.TEST_TX_TIME
import net.corda.testing.internal.vault.VaultFiller import net.corda.testing.internal.vault.VaultFiller
import net.corda.testing.node.internal.* import net.corda.testing.node.internal.*
import net.corda.testing.node.ledger import net.corda.testing.node.ledger
@ -706,10 +706,10 @@ class TwoPartyTradeFlowTests(private val anonymous: Boolean) {
notary: Party): Pair<Vault<ContractState>, List<WireTransaction>> { notary: Party): Pair<Vault<ContractState>, List<WireTransaction>> {
val ap = transaction(transactionBuilder = TransactionBuilder(notary = notary)) { val ap = transaction(transactionBuilder = TransactionBuilder(notary = notary)) {
output(CommercialPaper.CP_PROGRAM_ID, "alice's paper", notary = notary, output(CommercialPaper.CP_PROGRAM_ID, "alice's paper", notary = notary,
contractState = CommercialPaper.State(issuer, owner, amount, TEST_TX_TIME + 7.days)) contractState = CommercialPaper.State(issuer, owner, amount, net.corda.coretesting.internal.TEST_TX_TIME + 7.days))
command(issuer.party.owningKey, CommercialPaper.Commands.Issue()) command(issuer.party.owningKey, CommercialPaper.Commands.Issue())
if (!withError) if (!withError)
timeWindow(time = TEST_TX_TIME) timeWindow(time = net.corda.coretesting.internal.TEST_TX_TIME)
if (attachmentID != null) if (attachmentID != null)
attachment(attachmentID) attachment(attachmentID)
if (withError) { if (withError) {

View File

@ -17,7 +17,7 @@ import net.corda.testing.core.internal.JarSignatureTestUtils.signJar
import net.corda.testing.core.internal.SelfCleaningDir import net.corda.testing.core.internal.SelfCleaningDir
import net.corda.testing.internal.TestingNamedCacheFactory import net.corda.testing.internal.TestingNamedCacheFactory
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.After import org.junit.After

View File

@ -17,9 +17,9 @@ import net.corda.node.services.statemachine.ExternalEvent
import net.corda.nodeapi.internal.persistence.CordaPersistence import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.nodeapi.internal.persistence.DatabaseConfig import net.corda.nodeapi.internal.persistence.DatabaseConfig
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.internal.doLookup import net.corda.coretesting.internal.doLookup
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.internal.spectator import net.corda.coretesting.internal.spectator
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import net.corda.testing.node.TestClock import net.corda.testing.node.TestClock
import org.junit.* import org.junit.*

View File

@ -11,8 +11,8 @@ import net.corda.nodeapi.internal.crypto.CertificateType
import net.corda.nodeapi.internal.crypto.X509Utilities import net.corda.nodeapi.internal.crypto.X509Utilities
import net.corda.nodeapi.internal.crypto.x509Certificates import net.corda.nodeapi.internal.crypto.x509Certificates
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.DEV_INTERMEDIATE_CA import net.corda.coretesting.internal.DEV_INTERMEDIATE_CA
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.coretesting.internal.DEV_ROOT_CA
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals

View File

@ -7,16 +7,20 @@ import net.corda.core.identity.CordaX500Name
import net.corda.core.identity.Party import net.corda.core.identity.Party
import net.corda.core.identity.PartyAndCertificate import net.corda.core.identity.PartyAndCertificate
import net.corda.core.node.services.UnknownAnonymousPartyException import net.corda.core.node.services.UnknownAnonymousPartyException
import net.corda.node.services.persistence.PublicKeyToOwningIdentityCacheImpl
import net.corda.core.serialization.serialize import net.corda.core.serialization.serialize
import net.corda.coretesting.internal.DEV_INTERMEDIATE_CA
import net.corda.coretesting.internal.DEV_ROOT_CA
import net.corda.node.services.persistence.PublicKeyToOwningIdentityCacheImpl
import net.corda.nodeapi.internal.crypto.CertificateType import net.corda.nodeapi.internal.crypto.CertificateType
import net.corda.nodeapi.internal.crypto.X509Utilities import net.corda.nodeapi.internal.crypto.X509Utilities
import net.corda.nodeapi.internal.crypto.x509Certificates import net.corda.nodeapi.internal.crypto.x509Certificates
import net.corda.nodeapi.internal.persistence.CordaPersistence import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.nodeapi.internal.persistence.DatabaseConfig import net.corda.nodeapi.internal.persistence.DatabaseConfig
import net.corda.testing.core.* import net.corda.testing.core.ALICE_NAME
import net.corda.testing.internal.DEV_INTERMEDIATE_CA import net.corda.testing.core.BOB_NAME
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.core.TestIdentity
import net.corda.testing.core.getTestPartyAndCertificate
import net.corda.testing.internal.TestingNamedCacheFactory import net.corda.testing.internal.TestingNamedCacheFactory
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties
@ -26,7 +30,6 @@ import org.junit.Before
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertDoesNotThrow
import org.junit.jupiter.api.assertThrows
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertFailsWith import kotlin.test.assertFailsWith
import kotlin.test.assertNull import kotlin.test.assertNull

View File

@ -15,8 +15,8 @@ import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.nodeapi.internal.persistence.DatabaseConfig import net.corda.nodeapi.internal.persistence.DatabaseConfig
import net.corda.testing.common.internal.testNetworkParameters import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.internal.DEV_INTERMEDIATE_CA import net.corda.coretesting.internal.DEV_INTERMEDIATE_CA
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.coretesting.internal.DEV_ROOT_CA
import net.corda.testing.internal.TestingNamedCacheFactory import net.corda.testing.internal.TestingNamedCacheFactory
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices

View File

@ -11,10 +11,10 @@ import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.BOB_NAME import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.coretesting.internal.DEV_ROOT_CA
import net.corda.testing.internal.TestNodeInfoBuilder import net.corda.coretesting.internal.TestNodeInfoBuilder
import net.corda.testing.internal.createNodeInfoAndSigned import net.corda.coretesting.internal.createNodeInfoAndSigned
import net.corda.testing.internal.signWith import net.corda.coretesting.internal.signWith
import net.corda.testing.node.internal.network.NetworkMapServer import net.corda.testing.node.internal.network.NetworkMapServer
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.Assertions.assertThatThrownBy

View File

@ -17,6 +17,7 @@ import net.corda.core.node.NodeInfo
import net.corda.core.node.services.AttachmentId import net.corda.core.node.services.AttachmentId
import net.corda.core.serialization.serialize import net.corda.core.serialization.serialize
import net.corda.core.utilities.millis import net.corda.core.utilities.millis
import net.corda.coretesting.internal.DEV_ROOT_CA
import net.corda.node.VersionInfo import net.corda.node.VersionInfo
import net.corda.node.services.api.NetworkMapCacheInternal import net.corda.node.services.api.NetworkMapCacheInternal
import net.corda.node.services.config.NetworkParameterAcceptanceSettings import net.corda.node.services.config.NetworkParameterAcceptanceSettings
@ -29,11 +30,9 @@ import net.corda.nodeapi.internal.network.SignedNetworkParameters
import net.corda.nodeapi.internal.network.verifiedNetworkParametersCert import net.corda.nodeapi.internal.network.verifiedNetworkParametersCert
import net.corda.testing.common.internal.testNetworkParameters import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.coretesting.internal.TestNodeInfoBuilder
import net.corda.testing.internal.TestNodeInfoBuilder import net.corda.coretesting.internal.createNodeInfoAndSigned
import net.corda.testing.internal.createNodeInfoAndSigned
import net.corda.testing.node.internal.MockKeyManagementService import net.corda.testing.node.internal.MockKeyManagementService
import net.corda.testing.node.internal.MockPublicKeyToOwningIdentityCache
import net.corda.testing.node.internal.network.NetworkMapServer import net.corda.testing.node.internal.network.NetworkMapServer
import net.corda.testing.node.makeTestIdentityService import net.corda.testing.node.makeTestIdentityService
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat

View File

@ -11,7 +11,7 @@ import net.corda.node.internal.NetworkParametersReader
import net.corda.nodeapi.internal.network.* import net.corda.nodeapi.internal.network.*
import net.corda.testing.common.internal.testNetworkParameters import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.internal.DEV_ROOT_CA import net.corda.coretesting.internal.DEV_ROOT_CA
import net.corda.testing.node.internal.network.NetworkMapServer import net.corda.testing.node.internal.network.NetworkMapServer
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.After import org.junit.After

View File

@ -11,9 +11,8 @@ import net.corda.nodeapi.internal.NodeInfoAndSigned
import net.corda.nodeapi.internal.network.NodeInfoFilesCopier import net.corda.nodeapi.internal.network.NodeInfoFilesCopier
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.internal.createNodeInfoAndSigned import net.corda.coretesting.internal.createNodeInfoAndSigned
import net.corda.testing.node.internal.MockKeyManagementService import net.corda.testing.node.internal.MockKeyManagementService
import net.corda.testing.node.internal.MockPublicKeyToOwningIdentityCache
import net.corda.testing.node.makeTestIdentityService import net.corda.testing.node.makeTestIdentityService
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.Before import org.junit.Before

View File

@ -24,7 +24,6 @@ import net.corda.nodeapi.exceptions.DuplicateAttachmentException
import net.corda.nodeapi.internal.persistence.CordaPersistence import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.nodeapi.internal.persistence.DatabaseConfig import net.corda.nodeapi.internal.persistence.DatabaseConfig
import net.corda.testing.common.internal.testNetworkParameters import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.core.internal.ContractJarTestUtils
import net.corda.testing.core.internal.ContractJarTestUtils.makeTestContractJar import net.corda.testing.core.internal.ContractJarTestUtils.makeTestContractJar
import net.corda.testing.core.internal.ContractJarTestUtils.makeTestJar import net.corda.testing.core.internal.ContractJarTestUtils.makeTestJar
import net.corda.testing.core.internal.ContractJarTestUtils.makeTestSignedContractJar import net.corda.testing.core.internal.ContractJarTestUtils.makeTestSignedContractJar
@ -34,7 +33,7 @@ import net.corda.testing.core.internal.SelfCleaningDir
import net.corda.testing.internal.LogHelper import net.corda.testing.internal.LogHelper
import net.corda.testing.internal.TestingNamedCacheFactory import net.corda.testing.internal.TestingNamedCacheFactory
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties
import net.corda.testing.node.internal.InternalMockNetwork import net.corda.testing.node.internal.InternalMockNetwork
import net.corda.testing.node.internal.startFlow import net.corda.testing.node.internal.startFlow

View File

@ -15,7 +15,7 @@ import net.corda.testing.contracts.DummyContract
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.internal.LogHelper import net.corda.testing.internal.LogHelper
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties
import org.junit.After import org.junit.After
import org.junit.Before import org.junit.Before

View File

@ -15,6 +15,7 @@ import net.corda.core.node.services.vault.QueryCriteria.*
import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.LedgerTransaction
import net.corda.core.transactions.TransactionBuilder import net.corda.core.transactions.TransactionBuilder
import net.corda.core.utilities.* import net.corda.core.utilities.*
import net.corda.coretesting.internal.TEST_TX_TIME
import net.corda.finance.* import net.corda.finance.*
import net.corda.finance.contracts.CommercialPaper import net.corda.finance.contracts.CommercialPaper
import net.corda.finance.contracts.Commodity import net.corda.finance.contracts.Commodity
@ -31,7 +32,6 @@ import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.nodeapi.internal.persistence.DatabaseConfig import net.corda.nodeapi.internal.persistence.DatabaseConfig
import net.corda.nodeapi.internal.persistence.DatabaseTransaction import net.corda.nodeapi.internal.persistence.DatabaseTransaction
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.TEST_TX_TIME
import net.corda.testing.internal.chooseIdentity import net.corda.testing.internal.chooseIdentity
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.internal.vault.* import net.corda.testing.internal.vault.*

View File

@ -28,7 +28,7 @@ import net.corda.nodeapi.internal.cordapp.CordappLoader
import net.corda.nodeapi.internal.persistence.CordaPersistence import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.testing.core.singleIdentity import net.corda.testing.core.singleIdentity
import net.corda.testing.flows.registerCoreFlowFactory import net.corda.testing.flows.registerCoreFlowFactory
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.internal.InternalMockNetwork import net.corda.testing.node.internal.InternalMockNetwork
import net.corda.testing.node.internal.enclosedCordapp import net.corda.testing.node.internal.enclosedCordapp
import net.corda.testing.node.internal.startFlow import net.corda.testing.node.internal.startFlow

View File

@ -6,7 +6,7 @@ import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.whenever import com.nhaarman.mockito_kotlin.whenever
import net.corda.node.VersionInfo import net.corda.node.VersionInfo
import net.corda.node.services.config.NetworkServicesConfig import net.corda.node.services.config.NetworkServicesConfig
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import org.bouncycastle.pkcs.PKCS10CertificationRequest import org.bouncycastle.pkcs.PKCS10CertificationRequest
import org.junit.Test import org.junit.Test
import java.io.InputStream import java.io.InputStream

View File

@ -26,8 +26,8 @@ import net.corda.nodeapi.internal.crypto.X509Utilities.DISTRIBUTED_NOTARY_KEY_AL
import net.corda.nodeapi.internal.crypto.X509Utilities.createSelfSignedCACertificate import net.corda.nodeapi.internal.crypto.X509Utilities.createSelfSignedCACertificate
import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.ALICE_NAME
import net.corda.testing.internal.createDevIntermediateCaCertPath import net.corda.testing.internal.createDevIntermediateCaCertPath
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.internal.stubs.CertificateStoreStubs import net.corda.coretesting.internal.stubs.CertificateStoreStubs
import org.assertj.core.api.Assertions.* import org.assertj.core.api.Assertions.*
import org.bouncycastle.asn1.x509.GeneralName import org.bouncycastle.asn1.x509.GeneralName
import org.bouncycastle.asn1.x509.GeneralSubtree import org.bouncycastle.asn1.x509.GeneralSubtree

View File

@ -14,7 +14,7 @@ import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.nodeapi.internal.persistence.DatabaseConfig import net.corda.nodeapi.internal.persistence.DatabaseConfig
import net.corda.testing.core.* import net.corda.testing.core.*
import net.corda.testing.internal.configureDatabase import net.corda.testing.internal.configureDatabase
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties
import net.corda.testing.node.createMockCordaService import net.corda.testing.node.createMockCordaService

View File

@ -13,7 +13,7 @@ import net.corda.testing.core.DUMMY_NOTARY_NAME
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.core.dummyCommand import net.corda.testing.core.dummyCommand
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import net.corda.testing.node.internal.MockTransactionStorage import net.corda.testing.node.internal.MockTransactionStorage
import org.junit.Rule import org.junit.Rule

View File

@ -3,7 +3,7 @@ package net.corda.serialization.internal;
import net.corda.core.serialization.*; import net.corda.core.serialization.*;
import net.corda.core.serialization.internal.CheckpointSerializationContext; import net.corda.core.serialization.internal.CheckpointSerializationContext;
import net.corda.core.serialization.internal.CheckpointSerializer; import net.corda.core.serialization.internal.CheckpointSerializer;
import net.corda.node.serialization.kryo.CordaClosureSerializer; import net.corda.nodeapi.internal.serialization.kryo.CordaClosureSerializer;
import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule; import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule; import org.junit.Rule;

View File

@ -8,7 +8,7 @@ import net.corda.core.serialization.internal.checkpointDeserialize
import net.corda.core.serialization.internal.checkpointSerialize import net.corda.core.serialization.internal.checkpointSerialize
import net.corda.testing.contracts.DummyContract import net.corda.testing.contracts.DummyContract
import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import org.apache.commons.lang3.ArrayUtils.EMPTY_BYTE_ARRAY import org.apache.commons.lang3.ArrayUtils.EMPTY_BYTE_ARRAY
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat

View File

@ -16,12 +16,12 @@ import net.corda.core.node.services.AttachmentStorage
import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.CordaSerializable
import net.corda.core.serialization.internal.AttachmentsClassLoader import net.corda.core.serialization.internal.AttachmentsClassLoader
import net.corda.core.serialization.internal.CheckpointSerializationContext import net.corda.core.serialization.internal.CheckpointSerializationContext
import net.corda.node.serialization.kryo.CordaClassResolver import net.corda.nodeapi.internal.serialization.kryo.CordaClassResolver
import net.corda.node.serialization.kryo.CordaKryo import net.corda.nodeapi.internal.serialization.kryo.CordaKryo
import net.corda.node.services.attachments.NodeAttachmentTrustCalculator import net.corda.node.services.attachments.NodeAttachmentTrustCalculator
import net.corda.testing.common.internal.testNetworkParameters import net.corda.testing.common.internal.testNetworkParameters
import net.corda.testing.internal.TestingNamedCacheFactory import net.corda.testing.internal.TestingNamedCacheFactory
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.internal.services.InternalMockAttachmentStorage import net.corda.testing.internal.services.InternalMockAttachmentStorage
import net.corda.testing.services.MockAttachmentStorage import net.corda.testing.services.MockAttachmentStorage
import org.junit.Rule import org.junit.Rule

View File

@ -3,7 +3,7 @@ package net.corda.serialization.internal
import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.util.DefaultClassResolver import com.esotericsoftware.kryo.util.DefaultClassResolver
import net.corda.core.serialization.* import net.corda.core.serialization.*
import net.corda.node.serialization.kryo.kryoMagic import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
import net.corda.node.services.statemachine.DataSessionMessage import net.corda.node.services.statemachine.DataSessionMessage
import net.corda.serialization.internal.amqp.DeserializationInput import net.corda.serialization.internal.amqp.DeserializationInput
import net.corda.serialization.internal.amqp.Envelope import net.corda.serialization.internal.amqp.Envelope

View File

@ -6,7 +6,7 @@ import net.corda.core.identity.CordaX500Name
import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.CordaSerializable
import net.corda.core.serialization.deserialize import net.corda.core.serialization.deserialize
import net.corda.core.serialization.serialize import net.corda.core.serialization.serialize
import net.corda.node.serialization.kryo.kryoMagic import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
import net.corda.node.services.statemachine.DataSessionMessage import net.corda.node.services.statemachine.DataSessionMessage
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.internal.amqpSpecific import net.corda.testing.internal.amqpSpecific

View File

@ -8,11 +8,11 @@ import net.corda.core.serialization.internal.CheckpointSerializationContext
import net.corda.core.serialization.internal.checkpointDeserialize import net.corda.core.serialization.internal.checkpointDeserialize
import net.corda.core.serialization.internal.checkpointSerialize import net.corda.core.serialization.internal.checkpointSerialize
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.node.serialization.kryo.CordaClassResolver import net.corda.nodeapi.internal.serialization.kryo.CordaClassResolver
import net.corda.node.serialization.kryo.CordaKryo import net.corda.nodeapi.internal.serialization.kryo.CordaKryo
import net.corda.node.serialization.kryo.DefaultKryoCustomizer import net.corda.nodeapi.internal.serialization.kryo.DefaultKryoCustomizer
import net.corda.node.serialization.kryo.kryoMagic import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule import net.corda.testing.core.internal.CheckpointSerializationEnvironmentRule
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.Before import org.junit.Before

View File

@ -4,7 +4,7 @@ import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.util.DefaultClassResolver import com.esotericsoftware.kryo.util.DefaultClassResolver
import net.corda.core.serialization.deserialize import net.corda.core.serialization.deserialize
import net.corda.core.serialization.serialize import net.corda.core.serialization.serialize
import net.corda.node.serialization.kryo.kryoMagic import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
import net.corda.node.services.statemachine.DataSessionMessage import net.corda.node.services.statemachine.DataSessionMessage
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.internal.kryoSpecific import net.corda.testing.internal.kryoSpecific

View File

@ -8,7 +8,7 @@ import net.corda.serialization.internal.AllWhitelist
import net.corda.serialization.internal.CordaSerializationMagic import net.corda.serialization.internal.CordaSerializationMagic
import net.corda.serialization.internal.SerializationContextImpl import net.corda.serialization.internal.SerializationContextImpl
import net.corda.serialization.internal.amqp.testutils.serializationProperties import net.corda.serialization.internal.amqp.testutils.serializationProperties
import net.corda.testing.internal.createTestSerializationEnv import net.corda.coretesting.internal.createTestSerializationEnv
import org.hamcrest.CoreMatchers import org.hamcrest.CoreMatchers
import org.hamcrest.CoreMatchers.`is` import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.Matchers import org.hamcrest.Matchers

View File

@ -1,12 +1,12 @@
package net.corda.serialization.internal.amqp package net.corda.serialization.internal.amqp
import net.corda.client.rpc.internal.serialization.amqp.AMQPClientSerializationScheme import net.corda.nodeapi.internal.rpc.client.AMQPClientSerializationScheme
import net.corda.core.identity.AbstractParty import net.corda.core.identity.AbstractParty
import net.corda.core.schemas.MappedSchema import net.corda.core.schemas.MappedSchema
import net.corda.core.schemas.PersistentState import net.corda.core.schemas.PersistentState
import net.corda.core.schemas.QueryableState import net.corda.core.schemas.QueryableState
import net.corda.core.serialization.SerializedBytes import net.corda.core.serialization.SerializedBytes
import net.corda.node.serialization.amqp.AMQPServerSerializationScheme import net.corda.nodeapi.internal.serialization.amqp.AMQPServerSerializationScheme
import net.corda.serialization.internal.AMQP_RPC_CLIENT_CONTEXT import net.corda.serialization.internal.AMQP_RPC_CLIENT_CONTEXT
import net.corda.serialization.internal.AMQP_RPC_SERVER_CONTEXT import net.corda.serialization.internal.AMQP_RPC_SERVER_CONTEXT
import net.corda.serialization.internal.AllWhitelist import net.corda.serialization.internal.AllWhitelist

View File

@ -18,7 +18,7 @@ import net.corda.core.internal.AbstractAttachment
import net.corda.core.serialization.* import net.corda.core.serialization.*
import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.LedgerTransaction
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.node.serialization.amqp.AMQPServerSerializationScheme import net.corda.nodeapi.internal.serialization.amqp.AMQPServerSerializationScheme
import net.corda.nodeapi.internal.crypto.ContentSignerBuilder import net.corda.nodeapi.internal.crypto.ContentSignerBuilder
import net.corda.serialization.internal.* import net.corda.serialization.internal.*
import net.corda.serialization.internal.amqp.testutils.* import net.corda.serialization.internal.amqp.testutils.*
@ -27,7 +27,7 @@ import net.corda.testing.contracts.DummyContract
import net.corda.testing.core.BOB_NAME import net.corda.testing.core.BOB_NAME
import net.corda.testing.core.SerializationEnvironmentRule import net.corda.testing.core.SerializationEnvironmentRule
import net.corda.testing.core.TestIdentity import net.corda.testing.core.TestIdentity
import net.corda.testing.internal.rigorousMock import net.corda.coretesting.internal.rigorousMock
import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.api.core.SimpleString
import org.apache.qpid.proton.amqp.* import org.apache.qpid.proton.amqp.*
import org.apache.qpid.proton.codec.DecoderImpl import org.apache.qpid.proton.codec.DecoderImpl

Some files were not shown because too many files have changed in this diff Show More