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(candeletecardinalities): return correct response on route negative case (DEV-36) #1910

Merged
merged 9 commits into from Sep 29, 2021

Conversation

@mpro7
Copy link
Contributor

@mpro7 mpro7 commented Sep 28, 2021

resolves DEV-36

@mpro7 mpro7 requested a review from subotic Sep 28, 2021
@mpro7 mpro7 self-assigned this Sep 28, 2021
@mpro7 mpro7 changed the title fix(candeletecardinalities): return correct response for route in negative cases (DEV-36) fix(candeletecardinalities): return correct response for route for negative case (DEV-36) Sep 28, 2021
@mpro7 mpro7 requested a review from irinaschubert Sep 28, 2021
@mpro7 mpro7 changed the title fix(candeletecardinalities): return correct response for route for negative case (DEV-36) fix(candeletecardinalities): return correct response on route negative case (DEV-36) Sep 28, 2021
Copy link
Contributor

@irinaschubert irinaschubert left a comment

I like the removal of duplicated code. Did you test if it is working? Because there is now a new clientTestDataCollector created in each call of CollectClientTestData(...). Before, it was one clientTestDataCollector for all the tests in this file. Do we still get all test data in the end?

@@ -78,7 +78,20 @@ class OntologyV2R2RSpec extends R2RSpec {
private val clientTestDataPath: Seq[String] = Seq("v2", "ontologies")

// Collects client test data
private val clientTestDataCollector = new ClientTestDataCollector(settings)
// TODO: redefine below method somewhere else if can be reused over other test files
private def CollectClientTestData(filename: String, payload: String) = {
Copy link
Contributor

@irinaschubert irinaschubert Sep 28, 2021

Suggested change
private def CollectClientTestData(filename: String, payload: String) = {
private def collectClientTestData(filename: String, filecontent: String) = {

Copy link
Contributor Author

@mpro7 mpro7 Sep 28, 2021

@irinaschubert at the end it's both payload and the file content ;) but in the matter of consistency I accept this suggestion.

val clientTestDataCollector = new ClientTestDataCollector(settings) can be also defined outside the method, maybe this is better performance wise. Everything was working well, but I think that some tests failed after that commit 2d9c26d where we added 3 missing test data.

Copy link
Collaborator

@subotic subotic left a comment

LGTM, thanks!

private val clientTestDataCollector = new ClientTestDataCollector(settings)

// Collects client test data
// TODO: redefine below method somewhere else if can be reused over other test files
private def CollectClientTestData(fileName: String, fileContent: String): Unit =
Copy link
Collaborator

@subotic subotic Sep 28, 2021

good idea. thanks!

@mpro7 mpro7 merged commit 652c747 into main Sep 29, 2021
11 checks passed
@mpro7 mpro7 deleted the wip/DEV-36 branch Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants