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

Unit tests are failing #58

Closed
dstenger opened this issue Jan 31, 2023 · 9 comments
Closed

Unit tests are failing #58

dstenger opened this issue Jan 31, 2023 · 9 comments
Projects
Milestone

Comments

@dstenger
Copy link
Contributor

When project is built via mvn clean install following error occurs:

Results :

Failed tests: 
  VerifyTestNGController.cleanTestRun:56->runTests:91 Unexpected number of fail verdicts for file file:/home/stenger/git/ets-gpkg12-nsg/target/test-classes/gpkg/gdal_sample_v1.2_spi_nonlinear_webp_elevation.gpkg.
See file:/home/stenger/testng/d2ce7e0d-450e-40f0-bd85-0ff0d1d23aa1/testng-results.xml for details. expected:<0> but was:<5>

Tests run: 5, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.560 s
[INFO] Finished at: 2023-01-31T22:44:37+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project ets-gpkg12-nsg: There are test failures.

When test with file gdal_sample_v1.2_spi_nonlinear_webp_elevation.gpkg is commented out, other files fail as well.

Seems to be related to #26.

@dstenger dstenger added this to To do in CITE via automation Mar 2, 2023
@ghobona
Copy link
Contributor

ghobona commented Mar 2, 2023

The CITE engineering team will look into this issue in April 2023.

@dstenger dstenger added this to the 0.7 milestone Mar 6, 2023
@dstenger dstenger self-assigned this Apr 6, 2023
@dstenger
Copy link
Contributor Author

dstenger commented Apr 6, 2023

Following updates must be done to pass all tests again:

-        runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_spi_nonlinear_webp_elevation.gpkg"), 0);
-        runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_spatial_index_extension.gpkg"), 0);
-        runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_no_extensions.gpkg"), 0);
-        runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_no_extensions_with_gpkg_ogr_contents.gpkg"), 0);
-        runTests(ClassLoader.getSystemResource("gpkg/empty.gpkg"), 0);
-        runTests(ClassLoader.getSystemResource("gpkg/states10.gpkg"), 0);
-        runTests(ClassLoader.getSystemResource("gpkg/bluemarble.gpkg"), 0);
+        runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_spi_nonlinear_webp_elevation.gpkg"), 5);
+        runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_spatial_index_extension.gpkg"), 4);
+        runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_no_extensions.gpkg"), 4);
+        runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_no_extensions_with_gpkg_ogr_contents.gpkg"), 4);
+        runTests(ClassLoader.getSystemResource("gpkg/empty.gpkg"), 2);
+        runTests(ClassLoader.getSystemResource("gpkg/states10.gpkg"), 2);
+        runTests(ClassLoader.getSystemResource("gpkg/bluemarble.gpkg"), 4);
-        runTests(ClassLoader.getSystemResource("gpkg/elevation.gpkg"), 0); // These two are the id notnull thing
-        runTests(ClassLoader.getSystemResource("gpkg/coastline-polyline-hydro-115mil-and-smaller.gpkg"), 0);
-        runTests(ClassLoader.getSystemResource("gpkg/v12_bad_attributes.gpkg"), 1); // R119
-        runTests(ClassLoader.getSystemResource("gpkg/sample1_0.gpkg"), 1); // R77
-        runTests(ClassLoader.getSystemResource("gpkg/simple_sewer_features.gpkg"), 1); // This is an invalid 1.0 or 1.1 GPKG - it has an invalid metadata table (md_standard_URI instead of md_standard_uri) 
-        runTests(ClassLoader.getSystemResource("gpkg/sample1_1.gpkg"), 1); // R77
-        runTests(ClassLoader.getSystemResource("gpkg/sample1_2.gpkg"), 1); // R77
-        runTests(ClassLoader.getSystemResource("gpkg/sample1_2F10.gpkg"), 1); // Default "undefined", R77
-        runTests(ClassLoader.getSystemResource("gpkg/geonames_belgium.gpkg"), 3); // lower case data types, R77
-        runTests(ClassLoader.getSystemResource("gpkg/haiti-vectors-split.gpkg"), 2); // lower case data types, R77
-        runTests(ClassLoader.getSystemResource("gpkg/bentiu_southsudan-osm-20170213.gpkg"), 2); //R5, R29
+        runTests(ClassLoader.getSystemResource("gpkg/elevation.gpkg"), 5); // These two are the id notnull thing
+        runTests(ClassLoader.getSystemResource("gpkg/coastline-polyline-hydro-115mil-and-smaller.gpkg"), 3);
+        runTests(ClassLoader.getSystemResource("gpkg/v12_bad_attributes.gpkg"), 4); // R119
+        runTests(ClassLoader.getSystemResource("gpkg/sample1_0.gpkg"), 5); // R77
+        runTests(ClassLoader.getSystemResource("gpkg/simple_sewer_features.gpkg"), 5); // This is an invalid 1.0 or 1.1 GPKG - it has an invalid metadata table (md_standard_URI instead of md_standard_uri)
+        runTests(ClassLoader.getSystemResource("gpkg/sample1_1.gpkg"), 5); // R77
+        runTests(ClassLoader.getSystemResource("gpkg/sample1_2.gpkg"), 5); // R77
+        runTests(ClassLoader.getSystemResource("gpkg/sample1_2F10.gpkg"), 5); // Default "undefined", R77
+        runTests(ClassLoader.getSystemResource("gpkg/geonames_belgium.gpkg"), 6); // lower case data types, R77
+        runTests(ClassLoader.getSystemResource("gpkg/haiti-vectors-split.gpkg"), 5); // lower case data types, R77
+        runTests(ClassLoader.getSystemResource("gpkg/bentiu_southsudan-osm-20170213.gpkg"), 5); //R5, R29

All test files located here should be checked if the updated behavior regarding reported errors is correct.
E.g.: gdal_sample_v1.2_spi_nonlinear_webp_elevation.gpkg had 0 failures with v0.6 and 5 failures with current master branch.

@dstenger dstenger removed their assignment Apr 6, 2023
@dstenger
Copy link
Contributor Author

@cmorriscmps Could you please update VerifyTestNGController.java so that all unit tests are passing again? For details, please see my previous comment.

@dstenger dstenger moved this from To do to Waiting in CITE Apr 12, 2023
@cmorriscmps
Copy link
Collaborator

The better way to fix the tests would be to update the geopackage resource files. However, I'm not equipped to do that. My suggestion is to just comment out the tests that are failing, recognizing they still need work.

@jyutzler
Copy link

The better way to fix the tests would be to update the geopackage resource files. However, I'm not equipped to do that. My suggestion is to just comment out the tests that are failing, recognizing they still need work.

No, these files exist because they test specific situations that one might encounter in the field. It is important that the test cases in the test suite are as representative as possible. Do not change them and do not comment out the runTests calls that exercise them. Do consider creating new files based on existing ones to create exemplars for how to correctly exercise a particular part of the standard.

We need to understand why we are getting new failures and whether the failures are in alignment with the standard, including the abstract test suite. If these files are experiencing test failures that were missed by previous versions of the test suite, then that is a good thing. If the number of test failures (the second argument to runTests) changes, then it would be helpful to add a comment indicating what changed.

@cmorriscmps
Copy link
Collaborator

I have no objection if the community would prefer updating the tests as per dstenger's comment.

I haven't checked, but my guess is that the changes are due to WKT definitions not matching. The WKT files were changed to match the spec exactly in this version of the tests. The WKT comparison code is still too strict, as it says in the code:
// This is still an extremely incomplete test and the CRSs may still be the same. In part,
// this is due to different variations of WKT content.

@ghobona
Copy link
Contributor

ghobona commented May 3, 2023

@cmorriscmps Ok, thanks for the response. By "changed to match the spec exactly", I presume you mean the NSG GeoPackage spec.

Since the changes to the unit tests would only be applied to the NSG GeoPackage executable test suite, we will proceed as per @dstenger's comment above.

@dstenger dstenger self-assigned this May 10, 2023
@dstenger dstenger moved this from Waiting to In progress in CITE May 10, 2023
dstenger added a commit that referenced this issue May 10, 2023
@dstenger dstenger mentioned this issue May 10, 2023
@dstenger
Copy link
Contributor Author

A pull request was created fixing the unit tests as described in #58 (comment): #59

@dstenger dstenger moved this from In progress to To verify in CITE May 10, 2023
@dstenger dstenger removed their assignment May 10, 2023
@ghobona
Copy link
Contributor

ghobona commented May 16, 2023

I have just merged Pull Request #59 .

@ghobona ghobona closed this as completed May 16, 2023
CITE automation moved this from To verify to Done May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
CITE
  
Done
Development

No branches or pull requests

4 participants