Skip to content
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

The azure database used on CI / unit tests is not there anymore #387

Open
smoothdeveloper opened this issue Nov 8, 2020 · 1 comment
Open

Comments

@smoothdeveloper
Copy link
Collaborator

Some of the unit tests use a database hosted on azure by RedGate:

https://www.sqlservercentral.com/articles/connecting-to-adventureworks-on-azure

This seems to be offline now.

@cartermp would Microsoft contribute the same so we could still rely on it for our unit tests?

@smoothdeveloper
Copy link
Collaborator Author

#393 is affected by this

I suspected this is constructed with different values between Azure SQL and local SQL.

if scale = 0uy then
<@@ SqlMetaData(name, dbType) @@>
else
<@@ SqlMetaData(name, dbType, precision, scale) @@>
else
let maxLength = int64 p.MaxLength
<@@ SqlMetaData(name, dbType, maxLength) @@>

SqlMetaData.cs @ referencesource.microsoft.com

The constructors are likely to throw an exception if called "incorrectly".

https://referencesource.microsoft.com/#system.data/system/data/Sql/SqlMetaData.cs,410

       // everything except xml schema ctor
        public SqlMetaData(String name, SqlDbType dbType, long maxLength, byte precision, 
                           byte scale, long  localeId, SqlCompareOptions   compareOptions,
                           Type userDefinedType, bool useServerDefault,
                           bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal) {
            switch (dbType) {
                case SqlDbType.BigInt:
// snip
                default:
                    SQL.InvalidSqlDbTypeForConstructor(dbType);

Having an instance for development and CI purpose would help the project to address similar issues raising from discrepencies between Azure SQL and local SQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant