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

Add test coverage for improvement multipart encoded mode in rest-client #1847

Conversation

jcarranzan
Copy link
Contributor

Summary

Cover this backport--> quarkusio/quarkus#39770 (Improve the multipart encoded mode handling in the rest client)

Please select the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • Dependency update
  • Refactoring
  • Backport
  • New scenario (non-breaking change which adds functionality)
  • This change requires a documentation update
  • This change requires execution against OCP (use run tests phrase in comment)

Checklist:

  • Methods and classes used in PR scenarios are meaningful
  • Commits are well encapsulated and follow the best practices

@jcarranzan jcarranzan force-pushed the backports/multipart-encoded-mode-3.8.5 branch 3 times, most recently from 3f1bf8d to a77ecdd Compare June 20, 2024 05:47
@github-actions github-actions bot added the triage/flaky-test Signal that flaky tests were detected during CI run label Jun 20, 2024
Copy link

Following jobs contain at least one flaky test: 'PR - Windows - JVM build - Latest Version'

@jcarranzan jcarranzan force-pushed the backports/multipart-encoded-mode-3.8.5 branch 10 times, most recently from 8232bc8 to 9013951 Compare June 21, 2024 12:59

@ParameterizedTest
@ValueSource(strings = { "HTML5", "RFC1738", "RFC3986" })
public void testMultipartEncodeMode(String encoderMode) {
Copy link
Member

Choose a reason for hiding this comment

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

you are not using encoderMode which means you are not testing modes here

Copy link
Contributor Author

@jcarranzan jcarranzan Jun 24, 2024

Choose a reason for hiding this comment

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

Well, currently I am using by default HTML5 doing this:
@QuarkusApplication(properties = "test.properties") static RestService app = new RestService() .withProperty("quarkus.rest-client.multipart-post-encoder-mode", "HTML5");

Correct me if I am wrong

Copy link
Member

@michalvavrik michalvavrik Jun 24, 2024

Choose a reason for hiding this comment

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

that's fine if you are going to use encoderMode variable in the future

Copy link

Following jobs contain at least one flaky test: 'PR - Linux - JVM build - Latest Version'

@jcarranzan jcarranzan force-pushed the backports/multipart-encoded-mode-3.8.5 branch from 00b5751 to a381294 Compare June 23, 2024 21:36
@AfterAll
public static void tearDown() throws IOException {
serverCloseable.close();
vertx.close();
Copy link
Member

Choose a reason for hiding this comment

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

IMO you need to wait till future completes otherwise this process may be terminated prematurely by JUnit


});

return httpServer::close;
Copy link
Member

Choose a reason for hiding this comment

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

I think you are misunderstanding Closeable. TBH I didn't see this before, but I think here the method reference httpServer::close becomes same as

var closeable = new Closeable {

   void close() {
     httpServer.close();
 }

};
return closeable;

which means you are not waiting for the Future.

@jcarranzan jcarranzan force-pushed the backports/multipart-encoded-mode-3.8.5 branch from 550e70d to cab4ae9 Compare June 24, 2024 10:32
@rsvoboda
Copy link
Member

CI is failing, please look into it @jcarranzan

@jcarranzan
Copy link
Contributor Author

CI is failing, please look into it @jcarranzan

Thanks @rsvoboda but I will close this PR in favor of--> #1853

@jcarranzan jcarranzan closed this Jun 25, 2024
@michalvavrik michalvavrik removed the triage/flaky-test Signal that flaky tests were detected during CI run label Nov 20, 2024
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