rebus-org / Rebus.Oracle

:bus: Oracle transport for Rebus
https://mookid.dk/category/rebus
Other
5 stars 10 forks source link

Fix tests #19

Closed jods4 closed 5 years ago

jods4 commented 5 years ago
  1. Fix regressions caused by #17 It's all because Saga exceptions were not AggregateException anymore, so I wrapped them.

  2. Enable and fix the skipped test It failed because of dequeue was not ordered by visible time.

  3. Ensure we drop everything after tests, including procedures, etc. So that your DB stays clean!

EDIT: the 4 flaky tests seem to pass consistently on Rebus 6 (see #20)


@mookid8000 @thomasdc I need your help with 3 flaky tests. Namely CanSendAndReceive, MessageIsReturnedToQueueWhenReceivingTransactionIsNotCommitted and ReceivesSentMessageWhenTransactionIsCommitted. Those are all basic send/receive contract tests from Rebus.

They fail even before #17 so I don't think those changes are to blame.

When I run the full suite they almost always fail. When I run the fixture often 2 out of 3 fail. When I run the fixture with --verbose n (so more time is spent writing to console), they all pass. When I run them individually they all pass. When I run the three of them, usually just 1 fails.

I'm suspecting that there are race conditions somewhere (maybe missing await or whatnot). Considering that (correct me if I'm wrong):

I don't see any explanation than race conditions.

EDIT: HasOneWayClient also fails, sometimes.

jods4 commented 5 years ago

@mookid8000 Please note that the fix for the skipped test slightly changes the rebus_dequeue db procedure, which will not be automatically updated by upgrading the lib over an existing installation.

To do this properly we would need to version the schema somehow, which is not in place.

So existing users should either: