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 wrensec-commons. Remove PowerMock dependency. #157

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

karelmaxa
Copy link
Member

@karelmaxa karelmaxa commented Sep 14, 2023

I have upgraded the version of wrensec-commons to the latest SNAPSHOT with upgraded TestNG and Jackson dependencies. The PowerMock library is not compatible with TestNG 7.5.0+ and does not appear to be maintained anymore. So I have removed the PowerMock library from the repository.

I have successfully run our tests from the wrenam-test repository using the newly built version.

@@ -44,7 +46,7 @@ public class CTSWorkerBaseProcessTest {
public void setUp() throws Exception {
mockQuery = mock(CTSWorkerQuery.class);
mockFilter = mock(CTSWorkerFilter.class);
mockProcess = mock(CTSWorkerBaseProcess.class);
mockProcess = spy(CTSWorkerBaseProcess.class);
Copy link
Member

Choose a reason for hiding this comment

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

Is this intentional change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. We need to call the real method in the shouldUseQueryForNextPage test case (the mocked variant is not sufficient). The previous implementation worked because of different behaviour of the "PowerMock Mocker" (i think).

Copy link
Member

@pavelhoral pavelhoral left a comment

Choose a reason for hiding this comment

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

LGTM

@pavelhoral pavelhoral merged commit e485263 into WrenSecurity:main Sep 15, 2023
2 checks passed
@karelmaxa karelmaxa deleted the upgrade-commons branch September 15, 2023 09:39
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