-
Notifications
You must be signed in to change notification settings - Fork 439
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
Test only against SQLServer 2016. #420
Conversation
This changes the appveyor tests to run only against SQL Server 2016. But it also enables separate testing of all protocol versions.
@tvrprasad These changes here allow running the tedious integration tests using a specific version of the TDS protocol, instead of the latest version supported by the sql server that is used for the tests. The version can be specified using the We've had a few users complaining that they ran into issues when connecting to older SQL Server versions, getting the failing integration tests working again would be a great first step here. 👍 |
@arthurschreiber I'll take a look at this in the next few days or so. Sent you a couple of PRs on other issues. If you're able to merge them (or give feedback), that'll be great. Thanks. |
returns a null value for Variant type. This change addresses that.
- DateTime2 is only supported in 7_3_A and later. - VarChar max length is 8000 before 7_2. - NVarChar max length is 4000 before 7_2.
Tds multi version
events 'beginTransaction', 'commitTransaction' and 'rollbackTransaction'. These are all available only for TDS versions 7.2 and over. This is causing several transaction integration tests to fail. This PR attempts to fill in the gaps by managing inTransaction state based on equivalent events and callbacks for TDS versions below 7.2. All the tests pass now except for transactionHelperMixedWithLowLevelTransactionMethods.
Update transactionDepth for Savepoint in transaction(). With this all the tests pass for all versions TDS.
Change callback invocations for TDS version < 7.2 in beingTransaction, commitTransaction, rollbackTransaction and saveTransaction to not expose the internal Request object instance created to send the TRANSACTION SQL commands.
Currently inTransaction state on Connection is maintained based on the
Just saw the test failures. Seems like ...args syntax is not supported in NodeJS 4.5 and NodeJS 5.12 but supported in older and newer versions. That's odd. I'm looking. |
The rest parameters (i.e. the ...args) syntax is indeed not support in older versions of NodeJS. See http://node.green/ for the support status for different versions. The reason tests are passing for 0.12 and 0.10 is because of this magic line in test/setup.js: if (require('semver').lt(process.version, '4.0.0')) {
require('babel-register');
} We have two options:
I don't quite understand the implications of 1) at the moment. Please me know which option you like better and I'll send a PR. Thanks. |
I'm on a plane right now, I'll write up a longer response with all the For now, please revert to the 'function' syntax for the cases where you
|
…backs." Rest parameters syntax (i.e. the ...args syntax) is not supported in older versions of NodeJS. Hence the revert. This reverts commit cd7f4b6.
Revert "Switch from function() style to => in transaction method call…
Responding from a plane, wow! Very much appreciate it :) |
Thanks, this is great! Gonna merge this now. ❤️ |
@tvrprasad We use a library called The lines you pointed out in the I'm not 100% sure if that's the best approach - maybe we should simply embrace ES2016 as a whole? |
Thanks for the explanation. That makes sense now.
What in your mind is the value proposition in limiting which modern JS features we use? The only thing I can think of is that using current Node LTS supported features would make it easier for developers to contribute to the project. In build.coffee where we run the babel compiler, we're running it for all versions of node. Why is that? I'm guessing it's so we don't introduce modern syntax issues we didn't catch in tests but not sure. |
One other topic. How do we manage dropping support for older versions of node.js? In fact v0.10 just fell out of maintenance this month per https://nodesource.com/blog/essential-steps-long-term-support-for-nodejs/. Do we stop supporting it for new releases of Tedious? Perhaps this is only of academic interest at this point but could be real if we start run into some issue that's only on v0.10. |
I'd be in favour of dropping support for v0.10 and v0.12 (plus all iojs versions), not with the next release, but the one after. Do you think that makes sense? |
This happens so we can push a single package to npm, that is used across all supported versions of Node.js. |
That sounds reasonable to me.
Ah. That makes perfect sense! |
This changes the appveyor tests to run only against SQL Server 2016. But it also enables separate testing of all protocol versions.