Skip to content

fix(candeletecardinalities): return correct response on route negative case (DEV-36) - #1910

Merged
mpro7 merged 9 commits into
mainfrom
wip/DEV-36
Sep 29, 2021
Merged

mpro7 merged 9 commits into
mainfrom
wip/DEV-36

Conversation

@mpro7

@mpro7 mpro7 commented Sep 28, 2021

Copy link
Copy Markdown
Contributor

resolves DEV-36

@mpro7
mpro7 requested a review from subotic September 28, 2021 08:05
@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 September 28, 2021 08:13
@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

@irinaschubert irinaschubert left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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?

// 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
Copy Markdown

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@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.

@subotic subotic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks!


// 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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

good idea. thanks!

@mpro7
mpro7 merged commit 652c747 into main Sep 29, 2021
@mpro7
mpro7 deleted the wip/DEV-36 branch September 29, 2021 05:52
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.

3 participants