-
Notifications
You must be signed in to change notification settings - Fork 30
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
Update to NH 5.2 #31
Update to NH 5.2 #31
Conversation
The logging interface was refactored in 5.1 and not backwards compatible.
1 similar comment
Nice. Looks like the build is working again. The problem now is the connection string to the database isn't working. That's probably because I upgraded the app veyor image we are using, which also changed the database version. cc @MattDavies |
Ahhh I see why. @jaykay-design do you mind change this file to swap |
1 similar comment
OK getting closer. Looks like a bunch of tests passed and a bunch failed during test setup in the build logs. There looks to be two cases (repeated a bunch of times):
and
Not completely sure what the cause of those errors is. Migrations ran and some of the tests pass so it definitely worked to some extent. |
1 similar comment
I've updated NHibernateProfiler to 5.x as that version is compatible with NH5.1 onwards. I have no NHP license so I had that section commented out when running the tests locally. Some test still fail in AppVeyor though. I can see an SQLException about the server being paused and no connections are allowed. As I understand it, the tests use that method (pausing the server) so simulate connection failures, but, the associated error number (17142) is not handled in the SqlAzureTransientErrorDetectionStrategy. I'm not sure this is the best way to test though as existing connections would still be served by SQLServer (see this article). I have no alternative solution though. I'm now updating my SQLServer Express instance to 2019 so I'll have the same environment as AppVeyor and maybe track this down the issue like that. |
I've updated NHibernateProfiler to 5.x as that version is compatible with NH5.1 onwards. I have no NHP license so I had that section commented out when running the tests locally. Some test still fail in AppVeyor though. I can see an SQLException about the server being paused and no connections are allowed. As I understand it the tests use that (pausing the server) so simulate connection failures, but, the associated error number (17142) is not handled in the SqlAzureTransientErrorDetectionStrategy. I'm not sure this is the best way to test though as existing connections would still be served by SQLServer (see this article). I'm now updating my SQLServer Express instance to 2019 so I'll have the same environment as AppVeyor and maybe track this down the issue like that. |
I always found the pausing to work well enough in the past at least. We can see the error logging that indicates it actually invokes the retry logic. It's possible that the upgrade to 2019 has introduced a different error code for this circumstance so definitely worth adding that error code and seeing if it fixes it. Good idea re: getting 2019 locally. Probably good to check it works against the latest version of SQL anyway! Thanks for your efforts on this one :) |
instead of pausing/resuming the server constantly with 20ms delay the server is now paused after 100ms and left in that state for 50ms. All tests run for at least one second so this should be enough to simulate a temporary outage.
1 similar comment
1 similar comment
Nice! Getting close - only 1 error left (x 3 projects) |
1 similar comment
LYW! I like what you did. |
Fixes #28
All test pass.
The only changes done were using the refactored logging interface of NH 5.1 and later. Unfortunately this is not backwards compatible.
Please use this PR instead of PR#30 as PR#30 was made against my master branch.