planetfederal / qgis-geogiglight-plugin

GNU General Public License v2.0
19 stars 9 forks source link

two automated tests failing #109

Closed gioman closed 7 years ago

gioman commented 7 years ago
Test name: GeoGig Light-geogig.tests.testwebapilib.WebApiTests.testDiffWithPath
Test result:Test failed at step 'Run unit test' with message:
(<type 'exceptions.AssertionError'>, AssertionError('False is not true',), <traceback object at 0x7f9a52651638>)
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/home/giovanni/.qgis2/python/plugins/geogig/tests/testwebapilib.py", line 200, in testDiffWithPath
    self.assertTrue(self._compareLists(expected, diff[0].featurediff()))
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)

Traceback (most recent call last):
  File "/home/giovanni/.qgis2/python/plugins/qgistester/testerwidget.py", line 119, in runNextStep
    execute(step.function)
  File "/home/giovanni/.qgis2/python/plugins/qgistester/utils.py", line 70, in execute
    return func()
  File "/home/giovanni/.qgis2/python/plugins/qgistester/test.py", line 66, in _runTest
    raise Exception(desc)
Exception: (<type 'exceptions.AssertionError'>, AssertionError('False is not true',), <traceback object at 0x7f9a52651638>)
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/home/giovanni/.qgis2/python/plugins/geogig/tests/testwebapilib.py", line 200, in testDiffWithPath
    self.assertTrue(self._compareLists(expected, diff[0].featurediff()))
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)

and

Test name: GeoGig Light-geogig.tests.testwebapilib.WebApiTests.testFeature
Test result:Test failed at step 'Run unit test' with message:
(<type 'exceptions.AssertionError'>, AssertionError("{u'geometry': u'POINT (5 5)', u'n': 2} != {u'geometry': u'POINT (10 10)', u'n': 2}\n- {u'geometry': u'POINT (5 5)', u'n': 2}\n?                        ^^^\n\n+ {u'geometry': u'POINT (10 10)', u'n': 2}\n?                        ^^^^^\n",), <traceback object at 0x7f9a51313d40>)
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/home/giovanni/.qgis2/python/plugins/geogig/tests/testwebapilib.py", line 116, in testFeature
    self.assertEqual(expected, feature)
  File "/usr/lib/python2.7/unittest/case.py", line 513, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python2.7/unittest/case.py", line 835, in assertDictEqual
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python2.7/unittest/case.py", line 410, in fail
    raise self.failureException(msg)

Traceback (most recent call last):
  File "/home/giovanni/.qgis2/python/plugins/qgistester/testerwidget.py", line 119, in runNextStep
    execute(step.function)
  File "/home/giovanni/.qgis2/python/plugins/qgistester/utils.py", line 70, in execute
    return func()
  File "/home/giovanni/.qgis2/python/plugins/qgistester/test.py", line 66, in _runTest
    raise Exception(desc)
Exception: (<type 'exceptions.AssertionError'>, AssertionError("{u'geometry': u'POINT (5 5)', u'n': 2} != {u'geometry': u'POINT (10 10)', u'n': 2}\n- {u'geometry': u'POINT (5 5)', u'n': 2}\n?                        ^^^\n\n+ {u'geometry': u'POINT (10 10)', u'n': 2}\n?                        ^^^^^\n",), <traceback object at 0x7f9a51313d40>)
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/home/giovanni/.qgis2/python/plugins/geogig/tests/testwebapilib.py", line 116, in testFeature
    self.assertEqual(expected, feature)
  File "/usr/lib/python2.7/unittest/case.py", line 513, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python2.7/unittest/case.py", line 835, in assertDictEqual
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python2.7/unittest/case.py", line 410, in fail
    raise self.failureException(msg)
gioman commented 7 years ago

The same two plus a third one fail on Windows using the same QGIS version (2.18.4) with the same GG endpoint. Fails using BL Desktop are more (results attached).

automated_tests.zip

volaya commented 7 years ago

just tested on latest master and GG v1.0 and both tests pass... Looks like the tests might not be completely stable, because the error in the testFeature test was actually fixed in here:

https://github.com/boundlessgeo/qgis-geogiglight-plugin/commit/a9c2e11707ef6d7f97ae531c3709aa038f77e2e0

and now it seems that the returned feature is not the expected one, but the one that was expected before that fix. Strange.

gioman commented 7 years ago

@volaya running those tests by themselves make them work.

volaya commented 7 years ago

this should be fixed now. There was an issue with the test not creating always the same test repo

gioman commented 7 years ago

this should be fixed now. There was an issue with the test not creating always the same test repo

confirmed.