FSharp.Data.SqlClient icon indicating copy to clipboard operation
FSharp.Data.SqlClient copied to clipboard

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

Open smoothdeveloper opened this issue 5 years ago • 1 comments

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 avatar Nov 08 '20 21:11 smoothdeveloper

#393 is affected by this

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

https://github.com/fsprojects/FSharp.Data.SqlClient/blob/8bf8672162d588a1ceb503fd15d4df43e3655d14/src/SqlClient.DesignTime/DesignTime.fs#L549-L555

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.

smoothdeveloper avatar Nov 22 '20 09:11 smoothdeveloper