Skip to content

Commit a8f75b7

Browse files
Fix filter checking and disable platform-dependent tests
1 parent 841ce8a commit a8f75b7

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

src/main/java/blockchains/iaas/uni/stuttgart/de/adaptation/adapters/ethereum/EthereumAdapter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,13 @@ public Observable<Occurrence> subscribeToEvent(String smartContractAddress, Stri
354354
for (int i = 0; i < outputParameters.size(); i++) {
355355
parameters.add(Parameter.builder()
356356
.name(outputParameters.get(i).getName())
357+
.type(outputParameters.get(i).getType())
357358
.value(ParameterDecoder.decode(values.getNonIndexedValues().get(i)))
358359
.build());
359360
}
360361

361362
if (BooleanExpressionEvaluator.evaluate(filter, parameters)) {
362-
363363
EthBlock block = this.web3j.ethGetBlockByHash(log.getBlockHash(), false).send();
364-
365364
subscribeForTxEvent(log.getTransactionHash(), waitFor, TransactionState.CONFIRMED)
366365
.thenAccept(tx -> {
367366
LocalDateTime timestamp = LocalDateTime.ofEpochSecond(block.getBlock().getTimestamp().longValue(), 0, ZoneOffset.UTC);

src/main/java/blockchains/iaas/uni/stuttgart/de/adaptation/adapters/fabric/FabricAdapter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public Observable<Occurrence> subscribeToEvent(
142142
Parameter parameter = Parameter
143143
.builder()
144144
.name(outputParameters.get(0).getName())
145+
.type(outputParameters.get(0).getType())
145146
.value(new String(event.getPayload().get(), StandardCharsets.UTF_8))
146147
.build();
147148
parameters.add(parameter);

src/test/java/blockchains/iaas/uni/stuttgart/de/adaptation/adapters/ethereum/EthereumAdapterTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
* To run these tests, you need ganache with the following mnemonic:
4545
* smart contract composition
4646
*/
47+
@Disabled
4748
class EthereumAdapterTest {
4849
private static final String NETWORK_NAME = "eth-0";
4950
private static final String MESSAGE = "This was not a difficult task!";

src/test/java/blockchains/iaas/uni/stuttgart/de/adaptation/adapters/fabric/FabricAdapterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*
4343
* This ensures that the SDK is able to find the orderer and network peers.
4444
*/
45-
45+
@Disabled
4646
class FabricAdapterTest {
4747
private static final String NETWORK_NAME = "fabric-0";
4848
private static final String CHANNEL_NAME = "mychannel";

src/test/resources/gatewayConfiguration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"eth-0": {
33
"@type": "ethereum",
4-
"nodeUrl":"http://localhost:7545",
4+
"nodeUrl":"http://localhost:8545",
55
"keystorePath":"C:\\Ethereum\\keystore\\UTC--2019-05-30T11-21-08.970000000Z--90645dc507225d61cb81cf83e7470f5a6aa1215a.json",
66
"keystorePassword":"123456789",
77
"adversaryVotingRatio": "0.2"
@@ -21,7 +21,7 @@
2121
},
2222
"fabric-0" : {
2323
"@type": "fabric",
24-
"walletPath": "C:\\Users\\falazigb\\Documents\\GitHub\\fabric\\fabric-samples\\fabcar\\javascript\\wallet",
24+
"walletPath": "C:\\Users\\falazigb\\Documents\\GitHub\\fabric\\fabric-samples\\emc\\javascript\\wallet",
2525
"userName": "user1",
2626
"connectionProfilePath": "C:\\Users\\falazigb\\Documents\\GitHub\\fabric\\fabric-samples\\first-network\\connection-org1.json"
2727
}

0 commit comments

Comments
 (0)