Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to rlp_03 version 8 #9

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

upgrade to rlp_03 version 8 #9

wants to merge 20 commits into from

Conversation

kortemik
Copy link
Member

No description provided.

@kortemik kortemik changed the title upgrade to rlp_03 version 7 upgrade to rlp_03 version 8 Sep 25, 2024
Copy link
Contributor

@StrongestNumber9 StrongestNumber9 left a comment

Choose a reason for hiding this comment

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

Added bunch of comments and change requests

@@ -267,6 +267,8 @@
<version>3.12.1</version>
<configuration>
<compilerArgument>-Xlint:all</compilerArgument>
<source>9</source>
Copy link
Contributor

Choose a reason for hiding this comment

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

Version 9? We can enforce java8 with enforcer rules from project-archetype

@@ -257,8 +257,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<parallel>all</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
<parallel>none</parallel>
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a comment why parallelism is disabled

.orTimeout(connectionTimeout, TimeUnit.MILLISECONDS);

futureClient.thenAccept(client -> {
String offer = ("\nrelp_version=0\nrelp_software=cfe_35\ncommands=" + "syslog" + "\n");
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to have this as variable in code instead of defined field variable or something? Also why string concatenation as no variables are present

}
LOGGER.debug("returning outputReplyFutures.size() <{}>", outputReplyFutures.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

Debug guard this so .size() won't be repeatedly called

client.close();
}
catch (Exception e) {
throw new RuntimeException(e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this failure kill the whole process? If not, what happens to the client and other threads?

RoutingConfig routingConfig = new RoutingConfig();
try (TargetRouting targetRouting = new ParallelTargetRouting(routingConfig, this.metricRegistry)) {
try (
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer no try even if it is try-with-resources in tests


CompletableFuture.allOf(completableFutures).get();
}
catch (ExecutionException | InterruptedException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Try/catch in tests, refactor to a better version without them


CompletableFuture.allOf(completableFutures).get();
}
catch (ExecutionException | InterruptedException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Try/catch in tests, refactor to a version without them


CompletableFuture.allOf(completableFutures).get();
}
catch (ExecutionException | InterruptedException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Try/catch in tests, refactor to a version without them


CompletableFuture.allOf(completableFutures).get();
}
catch (ExecutionException | InterruptedException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Try/catch in tests, refactor to a version without them

@StrongestNumber9
Copy link
Contributor

Additional note: I haven't yet tested the compilation or even running the software and the notes above are just from the initial readthrough of the PR, will add more if necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants