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

[Tests] FTP: Use restrictions to bypass cert setup issues #6415

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

avano
Copy link
Contributor

@avano avano commented Sep 3, 2024

Currently both FtpTestResource and FtpsTestResource are instantiated before the first test runs.

The current method did not work when executing only the native tests (-Pnative -Dtest="\!*" -Dsurefire.failIfNoSpecifiedTests=false) without jvm tests. When running with -Pnative only (so jvm tests first, then native), the problem did not occur, as the FtpsIT did not actually use the certificates defined in FtpsTest, but reused the certificates generated by the invocation of SftpTest in jvm mode.

When running with -Pnative -Dtest="\!*" -Dsurefire.failIfNoSpecifiedTests=false, the "workflow" without this change was:

  1. start running FtpIT
  2. instantiate FtpTestResource
  3. instantiate SftpTestResource
  4. run FtpIT
  5. start running FtpsIT
  6. generate certificates needed for SftpTestResource, but that is already initialized

With this change, the order is:

  1. start running FtpIT
  2. instantiate FtpTestResource
  3. run FtpIT
  4. start running FtpsIT
  5. generate certificates needed for SftpTestResource
  6. instantiate SftpTestResource

please also backport to 3.8 when merged

@avano
Copy link
Contributor Author

avano commented Sep 3, 2024

@JiriOndrusek fyi

Copy link
Contributor

@aldettinger aldettinger left a comment

Choose a reason for hiding this comment

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

Well done.

@jamesnetherton jamesnetherton merged commit 43a0fe4 into apache:main Sep 3, 2024
24 checks passed
@avano avano deleted the ftp-tests branch September 5, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants