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

Refactor integration tests #80

Merged
merged 4 commits into from
Oct 2, 2023
Merged

Conversation

pjgg
Copy link
Contributor

@pjgg pjgg commented Mar 8, 2023

  • split Build GH actions into tree jobs validate-format, linux-build-jvm and linux-build-native
  • Replace a deprecated annotation on a native test
  • Kitchen Sink was moved to integration-tests folder
    A new scenario with a vanilla implementation has been added to the integration-tests folder
  • A new scenario with a smallrye implementation has been added to the integration-tests folder
  • Some small typos have been fixed onREADME.md

cc @masini @codepitbull 🙏

@pjgg pjgg changed the title Refactor on integration tests Refactor integration tests Mar 8, 2023
@masini
Copy link
Contributor

masini commented Mar 8, 2023

Hi Pablo, thank you for this fantastic contribution !

Which is the main reason behind the two tests without smallrye ? Are you testing that the same happen ?

@pjgg
Copy link
Contributor Author

pjgg commented Mar 8, 2023

  • Vanilla scenario is a low-level way to interact with HiveMQ broker. Give you a high level of control but a low level of abstraction (basically you have to do everything by yourself, as you can see in the example app). This coverage is useful to catch some errors on smallrye integration, I mean if something works on Vanilla but doesn´t work on smallrye coverage then the issue must be in smallrye.
  • On the other hand, smallrye scenarios is a full automated coverage of a no-SSL Mqtt client over smallrye

In my opinion, in the future, we could remove the scenario kitchensink and add more use cases to the new smallrye scenario. By use cases, I mean ... SSL coverage etc..

@masini fyi

pablo gonzalez granados added 3 commits July 30, 2023 18:54
Build job has been decopled into three jobs 'validate-format', 'linux-build-jvm' and 'linux-build-native'
The last two jobs depends on 'validate-format', so once the project is validated, we will run both jobs
in parallel.
@pjgg
Copy link
Contributor Author

pjgg commented Jul 30, 2023

@masini I have rebased my branch with the latest changes. Do you want me to change something?

@pjgg
Copy link
Contributor Author

pjgg commented Oct 1, 2023

@masini I have removed the "vanilla" coverage because I think that was a conflict point.

@@ -1,8 +1,8 @@
package io.quarkiverse.hivemqclient;

import io.quarkus.test.junit.NativeImageTest;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, any reason to not go native?

});
source.open();
Thread.sleep(15 * 1000L);
} catch (InterruptedException ignored) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if I understand this correctly. Shouldn't we fail in this exception?

priceCount.incrementAndGet();
});
source.open();
Thread.sleep(15 * 1000L);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to use CountDownLatch to avoid this sleep?

@masini masini merged commit bbfd569 into quarkiverse:main Oct 2, 2023
2 checks passed
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