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

Fix macOS compilation issues #580

Merged
merged 8 commits into from
Apr 5, 2024
Merged

Fix macOS compilation issues #580

merged 8 commits into from
Apr 5, 2024

Conversation

tadam50
Copy link
Contributor

@tadam50 tadam50 commented Jan 26, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?
No

What kind of change does this PR introduce?
Bug fix

What is the current behavior?
MacOS build is not always sucessful on the same test failure (TestCase11SubstationGraph::testWithHvdcLines)

What is the new behavior (if this is a feature change)?
Result of compareMetadata is not a simple boolean but return expected and actual metadata.
This, in order to ba able to use assertEquals instead of assertTrue to get more information at failure

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

@tadam50 tadam50 requested a review from So-Fras January 26, 2024 14:50
@tadam50 tadam50 self-assigned this Jan 26, 2024
@So-Fras So-Fras added the v4.3.0 label Jan 30, 2024
@tadam50 tadam50 force-pushed the fix-maxOS-compilation-issue branch from b7e43ca to b8a5365 Compare February 19, 2024 13:40
@tadam50 tadam50 marked this pull request as ready for review February 19, 2024 14:15
@tadam50 tadam50 requested a review from flo-dup February 20, 2024 09:46
@So-Fras So-Fras removed the v4.3.0 label Apr 2, 2024
Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

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

Why not doing the same test process than with svg or graph json? That is, in AbstractTestCase,

public abstract String toMetadata(Graph g, String filename);
public String toMetadata(Graph graph, String refMetadataName, LabelProvider labelProvider, StyleProvider styleProvider) {
  ...
}

which is then called in the unit tests by

assertEquals(toString("/metadata.json"), toMetadata(graph, "/metadata.json)

This should allow us to identify why it fails on macOS. Maybe we'll do the JsonNode comparison at the end, but here as the test issue is not completely identified we can't be sure that it's a good solution.

@tadam50 tadam50 force-pushed the fix-maxOS-compilation-issue branch from 7e80ce3 to 6aa20a7 Compare April 4, 2024 13:15
tadam50 and others added 2 commits April 4, 2024 16:00
Copy link

sonarqubecloud bot commented Apr 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@flo-dup flo-dup merged commit 5dc67a4 into main Apr 5, 2024
6 checks passed
@flo-dup flo-dup deleted the fix-maxOS-compilation-issue branch April 5, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants