Skip to content

Conversation

MakarovS
Copy link
Contributor

@MakarovS MakarovS commented Oct 31, 2019

Overview

Support DS changes in cryptocurrency module.


See: https://jira.bf.local/browse/ECR-3587

Definition of Done

  • There are no TODOs left in the code
  • Change is covered by automated tests
  • The coding guidelines are followed
  • Public API has Javadoc
  • Method preconditions are checked and documented in the Javadoc of the method
  • Changelog is updated if needed (in case of notable or breaking changes)
  • The continuous integration build passes

Add configuration usage in TestService initialization and update TestService initialization.
@MakarovS MakarovS removed the work-in-progress 👷‍♂️ Do not expect reviewers to provide any feedback on WIP PRs — please ask for it explicitly! label Nov 1, 2019
@MakarovS MakarovS changed the base branch from ECR-3571 to dynamic-services November 2, 2019 03:14
@coveralls
Copy link

coveralls commented Nov 2, 2019

Coverage Status

Coverage decreased (-0.5%) to 85.602% when pulling 0f7dd2f on ECR-3587 into a57c0a5 on master.

<systemPropertyVariables>
<it.artifactFilename>${artifactFilename}.jar</it.artifactFilename>
<it.artifactId>${groupId}:${artifactId}:${version}</it.artifactId>
<it.serviceName>cryptocurrency-demo</it.serviceName>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that specified in POM?

<it.artifactId>${groupId}:${artifactId}:${version}</it.artifactId>
<it.serviceName>cryptocurrency-demo</it.serviceName>
<it.serviceId>46</it.serviceId>
<it.artifactsDirectory>target</it.artifactsDirectory>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the standard variable ${project.build.directory} so that it works regardless of the current directory.

public CryptocurrencySchema(View view) {
public CryptocurrencySchema(View view, String serviceName) {
this.view = checkNotNull(view);
this.namespace = "cryptocurrency_service_namespace." + serviceName + ".";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't already unique service name enough for a namespace?


return node.withSnapshot((view) -> {
CryptocurrencySchema schema = new CryptocurrencySchema(view);
CryptocurrencySchema schema = new CryptocurrencySchema(view, serviceInstanceName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createDataSchema(view) -> CryptocurrencySchema

*/
static CreateWalletTx fromRawTransaction(RawTransaction rawTransaction) {
checkTransaction(rawTransaction, ID);
static CreateWalletTx from(int txId, byte[] arguments) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it accept the id if it isn't needed?

.build()
.toByteArray())
.build();
static byte[] createCreateWalletTxPayload(long initialBalance) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new seems to be a more appropriate prefix in this case.

ProtobufReflectiveSerializer(Class<MessageT> messageType) {
MethodHandles.Lookup lookup = MethodHandles.publicLookup();
MethodHandles.Lookup lookup = MethodHandles.publicLookup()
.in(messageType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such implementation must be clarified.

@MakarovS MakarovS changed the base branch from dynamic-services to master November 7, 2019 04:53
<configuration>
<argLine>
${jacoco.args}
-Djava.library.path=${ejb-core.nativeLibPath}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, removed it, thanks


@Test
@RequiresNativeLibrary
@Disabled("Disabled until transaction results fix")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add ticket number if any

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transaction result is already in (#1174)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabled these

ProtobufReflectiveSerializer(Class<MessageT> messageType) {
MethodHandles.Lookup lookup = MethodHandles.publicLookup();
MethodHandles.Lookup lookup = MethodHandles.publicLookup()
.in(messageType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such implementation must be clarified.

Copy link
Contributor

@dmitry-timofeev dmitry-timofeev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the build is red though.

@dmitry-timofeev dmitry-timofeev merged commit e02da8b into master Nov 14, 2019
@dmitry-timofeev dmitry-timofeev deleted the ECR-3587 branch November 14, 2019 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants