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
[WIP] Add integration tests for async/amqp, trace/amqp #172
Conversation
dbf37b4
to
18f4405
Compare
@tpaschalis Hi, we have to support integration tests to run locally also so we should start to use docker-compose for spinning up all necessary instances. |
This PR uses Github Actions to spin up the Rabbit MQ container we already have in our examples, and it seems to be working okay. I did have some problems with flakiness which were solved; nevertheless we should keep this in mind. For running tests locally, it might be a good idea to separate unit and integration tests, so the suite can run faster, and without external dependencies. This could happen either with a flag var runIntegrationTests = flag.Bool("integration", false
, "Run the integration tests (in addition to the unit tests)")
func TestXYZIntegration(t *testing.T) {
if !*runIntegrationTests {
this.T().Skip("")
}
...
} using build constraints by having separate or using the built-in if testing.Short() {
t.Skip("skipping integration tests in short mode")
} What do you think? |
@tpaschalis We have already a way of working with unit and integrations tests established in the company by using build tags. Please wait for issue #142 to be merged in order to build upon that. |
@tpaschalis We have now in master integration tests. You can use the docker-compose file to add rabbitmq and run these tests. |
ce54bc0
to
59c708d
Compare
Codecov Report
@@ Coverage Diff @@
## master #172 +/- ##
===========================================
- Coverage 84.48% 74.15% -10.33%
===========================================
Files 52 57 +5
Lines 3074 3235 +161
===========================================
- Hits 2597 2399 -198
- Misses 398 769 +371
+ Partials 79 67 -12
Continue to review full report at Codecov.
|
9e30ab6
to
6575ee0
Compare
50ebfee
to
9fe3c2a
Compare
53bc84f
to
7bbdab0
Compare
2b6aabf
to
9077133
Compare
c3c1bb4
to
7d52188
Compare
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
2c3406c
to
aa532f1
Compare
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
…alid exchange Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
cd35caa
to
e900e29
Compare
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
I'll be closing this PR as it's been too long to even remember where I left it at. I'll take a stab into writing the integration tests from scratch using dockertest like the other integration tests do. |
Which problem is this PR solving?
This PR closes #171 Add integration tests for async/amqp.
Short description of the changes
Notes
I'm using different queues for each package, as I came across messages from one package 'leaking' into another package's tests.
I will have to run some commits so I can live-debug Github Actions, hope it's okay.
As we mentioned, we need to avoid flakiness.
The tests seem to work without flakiness both locally and on Github Actions.