mirror of
https://github.com/corda/corda.git
synced 2025-02-06 11:09:18 +00:00
Fix CordaRPCJavaClientTest.java in database integration test mode (#256)
* Invoke setUp from base integration class in CordaRPCJavaClientTest * Align CordaRPCJavaClientTest with Kotlin version of the test
This commit is contained in:
parent
19df02541a
commit
a3295abf50
@ -40,8 +40,7 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
public static IntegrationTestSchemas databaseSchemas = new IntegrationTestSchemas(IntegrationTestKt.toDatabaseSchemaName(ALICE_NAME),
|
public static IntegrationTestSchemas databaseSchemas = new IntegrationTestSchemas(IntegrationTestKt.toDatabaseSchemaName(ALICE_NAME));
|
||||||
IntegrationTestKt.toDatabaseSchemaName(DUMMY_NOTARY_NAME));
|
|
||||||
|
|
||||||
private List<String> perms = Arrays.asList(
|
private List<String> perms = Arrays.asList(
|
||||||
startFlow(CashPaymentFlow.class),
|
startFlow(CashPaymentFlow.class),
|
||||||
@ -63,7 +62,8 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws ExecutionException, InterruptedException {
|
public void setUp() throws Exception {
|
||||||
|
super.setUp();
|
||||||
node = startNode(ALICE_NAME, 1, singletonList(rpcUser));
|
node = startNode(ALICE_NAME, 1, singletonList(rpcUser));
|
||||||
client = new CordaRPCClient(requireNonNull(node.getInternals().getConfiguration().getRpcAddress()));
|
client = new CordaRPCClient(requireNonNull(node.getInternals().getConfiguration().getRpcAddress()));
|
||||||
}
|
}
|
||||||
@ -79,11 +79,11 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCashBalances() throws NoSuchFieldException, ExecutionException, InterruptedException {
|
public void testCashBalances() throws ExecutionException, InterruptedException {
|
||||||
login(rpcUser.getUsername(), rpcUser.getPassword());
|
login(rpcUser.getUsername(), rpcUser.getPassword());
|
||||||
|
|
||||||
FlowHandle<AbstractCashFlow.Result> flowHandle = rpcProxy.startFlowDynamic(CashIssueFlow.class,
|
FlowHandle<AbstractCashFlow.Result> flowHandle = rpcProxy.startFlowDynamic(CashIssueFlow.class,
|
||||||
DOLLARS(123), OpaqueBytes.of("1".getBytes()),
|
DOLLARS(123), OpaqueBytes.of((byte)0),
|
||||||
CoreTestUtils.chooseIdentity(node.getInfo()));
|
CoreTestUtils.chooseIdentity(node.getInfo()));
|
||||||
System.out.println("Started issuing cash, waiting on result");
|
System.out.println("Started issuing cash, waiting on result");
|
||||||
flowHandle.getReturnValue().get();
|
flowHandle.getReturnValue().get();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user