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

Spring code samples refresh + overall refresh of deps #702

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

TomaszGaweda
Copy link
Contributor

  • Made all projects be a child of main project, so eg. failsafe and surefire configurations are shared
  • Modernized code
  • Fixed known flakiness
  • Modernized dependencies

@TomaszGaweda TomaszGaweda changed the title Spring code samples refresh Spring code samples refresh + overall refresh of deps Feb 10, 2025
.setProperty("keyStorePassword", "123456") //
.setProperty("trustStore", "src/ca.p12") //
.setProperty("trustStorePassword", "123456");
SSLConfig sslConf = config.getNetworkConfig().setSSLConfig(new SSLConfig()).getSSLConfig();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reason: my local JDK got confused with types there, it's safer to extract a variable.

Copy link
Contributor

Choose a reason for hiding this comment

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

JDK or IDE?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

JDK (built via maven)

.run/Template JUnit.run.xml Outdated Show resolved Hide resolved
.setProperty("keyStorePassword", "123456") //
.setProperty("trustStore", "src/ca.p12") //
.setProperty("trustStorePassword", "123456");
SSLConfig sslConf = config.getNetworkConfig().setSSLConfig(new SSLConfig()).getSSLConfig();
Copy link
Contributor

Choose a reason for hiding this comment

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

JDK or IDE?

@@ -25,9 +25,10 @@
<version>0.1-SNAPSHOT</version>
</dependency>


Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Double

Blank line.

pom.xml Outdated
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.10.0</version>
<version>5.11.4</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines 94 to 107
private String toHtmlTable(Map<String, Object> attributes) {
StringBuilder html = new StringBuilder("<html>");
html.append("<table border=\"1\" cellpadding=\"5\" cellspacing=\"5\">");
StringBuilder html = new StringBuilder("<html><body>");
html.append("<table style=\"border-spacing: 5px; border: 1px solid black;\">");
attributes.forEach((k, v) -> addHtmlTableRow(html, k, v));
html.append("</table></html>");
html.append("</table></body></html>");
return html.toString();
}

private void addHtmlTableRow(StringBuilder content, String key, Object value) {
content.append("<tr>")
.append("<th>").append(key).append("</th>")
.append("<td>").append(value).append("</td>")
.append("</tr>");
.append("<th style=\"padding: 5px;\">").append(key).append("</th>")
.append("<td style=\"padding: 5px;\">").append(value).append("</td>")
.append("</tr>");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like whole thing could be implemented better (no reflection on your changes) - maybe a text-block template with a .formatted call consuming a stream-mapping of attributes?

@@ -93,18 +93,17 @@ private void printCachesFromCacheManager() {
private void printCachesFromHazelcast() {
LOGGER.info("Caches from hazelcast:");
for (DistributedObject distributedObject : hazelcastInstance.getDistributedObjects()) {
LOGGER.info(" - " + distributedObject.getName());
LOGGER.info(" - {}", distributedObject.getName());
Copy link
Contributor

@JackPGreen JackPGreen Feb 10, 2025

Choose a reason for hiding this comment

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

🤘

…t/src/main/java/com/hazelcast/guide/controller/SessionController.java

Co-authored-by: Jack Green <[email protected]>
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