objectcomputing / check-ins

Other
7 stars 7 forks source link

[2237] Test Containers Fail To Start For Classes Not Using The TestContainers On Windows #2457

Closed mjperry91 closed 3 weeks ago

mjperry91 commented 3 weeks ago

This may just be a windows issue as it works fine on the CI. One thing I did notice was adding back the @TestContainer and @Container annotations also fixed this issue (as was done in this draft). Though despite this causing the tests run faster on my local machine (-40seconds) they become significantly slower on the CI (+3 mins). So this seems to be the preferable solution.

Closes: https://github.com/objectcomputing/check-ins/issues/2456

mjperry91 commented 3 weeks ago

@mjperry91 Cool! I wonder why it wasn't picking up the testcontainers driver and url from config 🤔

I really hope you don't mind, but I pushed some cleanup commits (stop using public on tests, move away from deprecated initMocks and close the handle returned by openMocks)

I also removed the testcontainers datasource config from application-test.yml as I don't think it's used any more 🤔

Not at all!