Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2666 closed defect (duplicate)

stats unittests fail (python 3.3?)

Reported by: muks Owned by:
Priority: low Milestone:
Component: statistics Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: (no need to estimate) Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description (last modified by muks)

A unittest fails in src/bin/stats/tests/:

======================================================================
FAIL: test_do_GET (__main__.TestHttpHandler)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/muks/bind10/src/bin/stats/tests/b10-stats-httpd_test.py", line 308, in test_do_GET
    check_XML_URL_PATH()
  File "/home/muks/bind10/src/bin/stats/tests/b10-stats-httpd_test.py", line 303, in check_XML_URL_PATH
    self.assertEqual(attr['value'], str(value))
AssertionError: '2' != '10'
- 2
+ 10

Here is another failure report in the same dir:

F.....
======================================================================
ERROR: test_polling (__main__.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/muks/bind10/src/bin/stats/tests/b10-stats_test.py", line 1167, in test_polling
    for s in stat.statistics_data_bymid['Auth'].values():
KeyError: 'Auth'

======================================================================
FAIL: test_command_show (__main__.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/muks/bind10/src/bin/stats/tests/b10-stats_test.py", line 788, in test_command_show
    'queries.tcp': sum_qtcp_nds_perzone20 }
AssertionError: {'result': [0, {'Auth': {'queries.udp': 0, 'queries.tcp': 0, 'queries.perzone':  [truncated]... != {'result': [0, {'Auth': {'queries.tcp': 6, 'queries.udp': 4, 'queries.perzone':  [truncated]...
Diff is 2888 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_update_statistics_data_withmid (__main__.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/muks/bind10/src/bin/stats/tests/b10-stats_test.py", line 630, in test_update_statistics_data_withmid
    bar1_tcp + sum_qtcp)
AssertionError: 1001 != 1007

----------------------------------------------------------------------
Ran 23 tests in 0.618s

FAILED (failures=2, errors=1)
make[3]: *** [check-local] Error 1

I don't know if it's a Python 3.3 issue, but it didn't used to happen before. I started seeing this right after moving to Fedora 18 (with Python 3.3).

Subtickets

Attachments (1)

stats_tests_disabled_in_python3.3.diff (2.3 KB) - added by naokikambe 7 years ago.
Disables stats tests in Python 3.3 or higher

Download all attachments as: .zip

Change History (12)

comment:1 Changed 7 years ago by muks

  • Description modified (diff)
  • Summary changed from stats unittest test_do_GET fails (python 3.3?) to stats unittests fail (python 3.3?)

comment:2 Changed 7 years ago by muks

Now I can't get it to fail.. so it only happens intermittently, and also from a cold cache. Once it fails, it doesn't fail anymore for a long time (this box has 32G of memory; I have noticed it failing only after running it for the first time after a reboot).

comment:3 Changed 7 years ago by jelte

  • Milestone changed from Next-Sprint-Proposed to Sprint-20130205
  • Priority changed from medium to low

comment:4 Changed 7 years ago by jelte

  • Milestone Sprint-20130205 deleted

This may be fixed (or probably made easier to fix) once we have done #1668, so for now I'm deferring it.

comment:5 Changed 7 years ago by naokikambe

I rebuilt my environment for Python3.3 and investigate it a bit. So I found such errors come with errors like the following.

...
2013-02-12 16:58:07.892 ERROR [b10-stats.config/22594] CONFIG_SESSION_STOPPING_FAILED error sending stopping message: [Errno 32] Broken pipe
...
2013-02-12 16:58:08.101 WARN  [b10-stats.stats/22594] STATS_RECEIVED_INVALID_STATISTICS_DATA received invalid statistics data from Auth
...

Anyway, I'll attach a patch which disables stats tests in Python 3.3 or higher until #1668 is done.

Changed 7 years ago by naokikambe

Disables stats tests in Python 3.3 or higher

comment:6 follow-up: Changed 7 years ago by naokikambe

The patch was okayed to be committed on jabber.

comment:7 in reply to: ↑ 6 Changed 7 years ago by naokikambe

Replying to naokikambe:

The patch was okayed to be committed on jabber.

I've pushed to master at 6409bf0fb2fcb3d60c664009be730f1a71fdac54.

comment:8 follow-up: Changed 7 years ago by jinmei

  • Estimated Difficulty changed from 0 to (no need to estimate)
  • Milestone set to Next-Sprint-Proposed

I believe #2823 gives a complete solution to this problem
(in fact #2823 removed the "@skip"s).
I'm moving it to next-sprint-proposed just to close the ticket
at the time of sprint planning meeting.

comment:9 in reply to: ↑ 8 Changed 7 years ago by jinmei

Replying to jinmei:

I believe #2823 gives a complete solution to this problem
(in fact #2823 removed the "@skip"s).
I'm moving it to next-sprint-proposed just to close the ticket
at the time of sprint planning meeting.

now closing.

comment:10 Changed 7 years ago by jinmei

  • Resolution set to duplicate
  • Status changed from new to closed

comment:11 Changed 7 years ago by muks

  • Milestone Previous-Sprint-Proposed deleted
Note: See TracTickets for help on using tickets.