chaoss / grimoirelab-perceval

Send Sir Perceval on a quest to retrieve and gather data from software repositories.
http://perceval.readthedocs.io/
GNU General Public License v3.0
290 stars 177 forks source link

Test failure in stackexchange (likely TZ) #802

Closed xurizaemon closed 1 year ago

xurizaemon commented 2 years ago
$ poetry run coverage run --source=perceval run_tests.py
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.............................................................................
======================================================================
FAIL: test_get_questions_from_date (test_stackexchange.TestStackExchangeClient)
Test question is returned from a given date
----------------------------------------------------------------------
Traceback (most recent call last):
  File "$home/.cache/pypoetry/virtualenvs/perceval-ULBDQhvj-py3.8/lib/python3.8/site-packages/httpretty/core.py", line 2075, in wrapper
    return test(*args, **kw)
  File "$grimoirelab/src/grimoirelab-perceval/tests/test_stackexchange.py", line 401, in test_get_questions_from_date
    self.assertDictEqual(httpretty.last_request().querystring, payload)
AssertionError: {'pag[160 chars]qozgU6lXL_62USGOoV3)MFNgiHqHpmO_Y-jHR'], 'min': ['1456830000']} != {'pag[160 chars]qozgU6lXL_62USGOoV3)MFNgiHqHpmO_Y-jHR'], 'min': ['1456833600']}
  {'filter': ['Bf*y*ByQD_upZqozgU6lXL_62USGOoV3)MFNgiHqHpmO_Y-jHR'],
   'key': ['aaa'],
-  'min': ['1456830000'],
?                 ^^

+  'min': ['1456833600'],
?                 ^^

   'order': ['asc'],
   'page': ['1'],
   'pagesize': ['1'],
   'site': ['stackoverflow'],
   'sort': ['activity'],
   'tagged': ['python']}

----------------------------------------------------------------------
Ran 1007 tests in 69.228s

FAILED (failures=1)

The time for me right now is within 24H of the DST / NZDST time shift, so it's possible this may need specific circumstances to reproduce. FIgure I should report it while I see it then!

Steps to reproduce, in Perceval codebase:

curl -sSL https://install.python-poetry.org | python3 -
export PATH=$PATH:~/.local/bin

cd grimoirelab-perceval
poetry install -vvv
poetry add -D coveralls
cd tests
poetry run coverage run --source=perceval run_tests.py
vchrombie commented 1 year ago

Hi @xurizaemon, thanks for opening the issue.

I tried running the tests and I wasn't able to reproduce the issue.

$ poetry run coverage run --source=perceval run_tests.py
..........
----------------------------------------------------------------------
Ran 1010 tests in 43.211s

OK

Can you try running them again? I'm not sure if what went wrong but I am sure that things are working correctly now. The CI looks good too.

Please let me know if we can close the issue. Thanks.

vchrombie commented 1 year ago

The tests are running fine now, closing the issue. In any other case, please feel free to open it again.