Opened 4 years ago

Closed 4 years ago

#934 closed task (fixed)

Fix GenericRdbms unit test baseline

Reported by: jng Owned by: jng
Priority: major Milestone:
Component: GenericRdbms API Version:
Severity: 3 Keywords:
Cc: External ID:

Description (last modified by jng)

There's a whole series of backlogged patches against various GenericRdbms-based FDO providers (primarily for OSGeo.PostgreSQL and OSGeo.SQLServerSpatial) that I'd like to see applied, but before I do that, I want to make sure the GenericRdbms test suite baseline is all tests passing.

Currently, this is not the case. With this environment:

  • SQL Server 2017 (on Linux)
  • MySQL 5.5
  • PostgreSQL 9.5/PostGIS 2.4

We have the following failures:

SQL Server:

Test Results:
Run:  274   Failures: 4   Errors: 0

1) test: SqlServerFdoApplySchemaTest.TestSchema (F) line: 1663 Common\UnitTestUtil.cpp
 "Output file SQLServerSpatial_8759_apply_schema_test6_LPhF.xml differs from expected output file SQLServerSpatial_8759_apply_schema_test6_master.txt"

2) test: SqlServerFdoApplySchemaTest.TestOverrideErrors (F) line: 1663 Common\UnitTestUtil.cpp
 "Output file SQLServerSpatial_8759_SQLServerSpatial_8759_apply_schema_overrides_err1SP.txt differs from expected output file apply_schema_overrides_err1SP_master.txt"

3) test: SqlServerFdoApplySchemaTest.TestNoMeta (F) line: 1663 Common\UnitTestUtil.cpp
 "Output file SQLServerSpatial_8759_SQLServerSpatial_8759_apply_no_meta_err2.txt differs from expected output file apply_no_meta_err2_master.txt"

4) test: SqlServerSchemaMgrTests.testConfigError (F) line: 2051 Common\SchemaMgrTests.cpp
 "pMessage && expectedMessage.ICompare(pMessage) == 0"


Test Results:
Run:  131   Failures: 4   Errors: 0

1) test: PostGisFdoSpatialContextTest.testAxes (F) line: 190 PostGis\PostGisFdoSpatialContextTest.cpp
 "wrong part of WKT removed, see log"

2) test: PostGisSchemaMgrTests.testGenDefault (F) line: 1663 Common\UnitTestUtil.cpp
 "Output file PostGIS_8391_gen_default1.xml differs from expected output file PostGIS_8391_gen_default1_PostGIS_master.txt"

3) test: PostGisFdoApplySchemaTest.TestSchema (F) line: 1663 Common\UnitTestUtil.cpp
 "Output file PostGIS_8391_apply_schema_test6_LPhF.xml differs from expected output file PostGIS_8391_apply_schema_test6_master.txt"

4) test: PostGisFdoApplySchemaTest.TestNoMeta (F) line: 1663 Common\UnitTestUtil.cpp
 "Output file PostGIS_8391_apply_no_meta_test1.xml differs from expected output file PostGIS_8391_apply_no_meta_test1_master.xml"


Test Results:
Run:  244   Failures: 2   Errors: 1

1) test: MySqlFdoApplySchemaTest.TestSchema (F) line: 1223 Common\UnitTestUtil.cpp
 "RDBMS: Duplicate entry 'aCxdATA-Acad' for key 'f_classdef_schnm_idx'

2) test: MySqlFdoApplySchemaTest.TestOverrideErrors (F) line: 1663 Common\UnitTestUtil.cpp
 "Output file MySql_10680_MySql_10680_apply_schema_overrides_err1.txt differs from expected output file apply_schema_overrides_err1_master.txt"

3) test: MySqlReaderTest.TestExceptionalCase (E) 
 "caught unknown exception"

Most of these failures can be fixed by:

  1. General: Removing whitespace around certain master text files that are not present in the generated result
  2. General: Adding source file/line number to the <error> element of to apply_schema_test6_master.txt
  3. MySqlReaderTest.TestExceptionalCase: Un-expected exception due to running a SQL query using a table name in incorrect case.
  4. SqlServerSchemaMgrTests.testConfigError: Load an alternative configuration document for the test case that does not use OracleProvider schema mappings.

Change History (5)

comment:1 by jng, 4 years ago

Description: modified (diff)

comment:2 by jng, 4 years ago

Description: modified (diff)

comment:3 by jng, 4 years ago

I've found out why there were these content comparison errors in the various text files.

I had been running these tests in release mode. In debug mode, some of the error messages have a space in front of the error message!

The issue is that UnitTestUtil::PrintException is inconsistent in how it prints its errors between debug/release modes.

comment:4 by jng, 4 years ago

PostGIS spatial context test is failing for srid=2000 with this WKT:

PROJCS["Anguilla 1957 / British West Indies Grid",GEOGCS["Anguilla 1957",DATUM["Anguilla_1957",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6600"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4600"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","2000"]]

The fixed WKT is malformed at the end (note the lack of comma before the last AUTHORITY element

PROJCS["Anguilla 1957 / British West Indies Grid",GEOGCS["Anguilla 1957",DATUM["Anguilla_1957",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6600"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4600"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]AUTHORITY["EPSG","2000"]]

comment:5 by jng, 4 years ago

Resolution: fixed
Status: assignedclosed

The only remaining failures are now recorded separately as #935 and #936

Note: See TracTickets for help on using tickets.