-
Notifications
You must be signed in to change notification settings - Fork 933
NH-4015 - Update Npgsql driver and enable DTC for it #630
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
Conversation
74cfa24
to
5a9f4db
Compare
Got DTC errors as expected, we need to enable it on TeamCity build agent, but I do not know the credentials for this. Got some other tests errors due to a breaking change in Npgsql, rebased on #631 for solving them. |
PostgreSql re-run had one DTC test failing, apparently due to previously done insert not already taken into account. It looks like it has the "latency" issues I am suspecting here. Going to rebase on NH-4017 anyway. |
c76f80d
to
f9da969
Compare
MICROSOFT SOFTWARE LICENSE TERMS | ||
|
||
|
||
MICROSOFT .NET LIBRARY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need that dependency for testing Npgsql v3. So I have put it there, but this causes NHibernate sources to "redistribute" it and so being subject to comply with that licence.
Maybe we should instead add the NuGet dependency in the test project, it would avoid having to "redistribute" that only for tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote for NuGet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -276,6 +276,9 @@ public void CanDeleteItemInDtc() | |||
} | |||
} | |||
|
|||
// Dodging "latency" due to db still haven't actually committed a distributed tx after scope disposal. | |||
Thread.Sleep(100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intend to put a better "dodge" logic in #627. It will apply only to database drivers showcasing the "latency" trouble.
f9da969
to
1b3cd56
Compare
ffaa3b0
to
c364ccd
Compare
c364ccd
to
2adba0b
Compare
Any concern against merging this? |
/// <summary> | ||
/// Npgsql's DTC code seems to be somewhat broken as of 2.0.11. | ||
/// </summary> | ||
public override bool SupportsDistributedTransactions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check when DTC become available in Postgres.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, it is available since long. Tests succeed. It was failing previously not because Postgres was not supporting it, but because we were not at all enlisting Postgres connection into scopes: enlist is false
by default with npgsql. This PR switch it to true
in the test connection string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry, I did not see that this is a dialect's test-double.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged |
NH-4015 - Update Npgsql driver and enable DTC for it
I expect this to fail due to DTC not yet enabled on teamcity server side.
I have seen the link to open a rdp toward it, but I have not found a valid login for connecting and adjusting that.