Edgewall Software
Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12361 closed enhancement (fixed)

Reduce session karma

Reported by: Ryan J Ollos Owned by: Dirk Stöcker
Priority: normal Milestone: plugin - spam-filter
Component: plugin/spamfilter Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
  • Reduced session karma since we have auto-logins.
  • Updated default IP blacklist servers.
API Changes:
Internal Changes:

Description

Mentioned in comment:1:ticket:12360 was that it's helpful to have tickets to discuss changes. One reason is, the changes in r14543 broke the tests. I recently fixed all failing tests before bumping the version to 1.0.7. I'll look into fixing the failing tests now.

test_new_session (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase) ... FAIL
test_session_email_set (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase) ... FAIL
test_session_email_set_but_invalid (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase) ... FAIL
test_session_name_and_email_set (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase) ... FAIL
test_session_name_set (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase) ... FAIL

======================================================================
FAIL: test_new_session (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rjollos/Documents/Workspace/trac-dev/spam-filter/tracspamfilter/filters/tests/session.py", line 31, in test_new_session
    self.assertEqual((3, 'Existing session found'), retval)
AssertionError: Tuples differ: (3, 'Existing session found') != (2, 'Existing session found')

First differing element 0:
3
2

- (3, 'Existing session found')
?  ^

+ (2, 'Existing session found')
?  ^


======================================================================
FAIL: test_session_email_set (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rjollos/Documents/Workspace/trac-dev/spam-filter/tracspamfilter/filters/tests/session.py", line 43, in test_session_email_set
    self.assertEqual((6, 'Existing session found'), retval)
AssertionError: Tuples differ: (6, 'Existing session found') != (4, 'Existing session found')

First differing element 0:
6
4

- (6, 'Existing session found')
?  ^

+ (4, 'Existing session found')
?  ^


======================================================================
FAIL: test_session_email_set_but_invalid (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rjollos/Documents/Workspace/trac-dev/spam-filter/tracspamfilter/filters/tests/session.py", line 49, in test_session_email_set_but_invalid
    self.assertEqual((3, 'Existing session found'), retval)
AssertionError: Tuples differ: (3, 'Existing session found') != (2, 'Existing session found')

First differing element 0:
3
2

- (3, 'Existing session found')
?  ^

+ (2, 'Existing session found')
?  ^


======================================================================
FAIL: test_session_name_and_email_set (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rjollos/Documents/Workspace/trac-dev/spam-filter/tracspamfilter/filters/tests/session.py", line 55, in test_session_name_and_email_set
    self.assertEqual((9, 'Existing session found'), retval)
AssertionError: Tuples differ: (9, 'Existing session found') != (6, 'Existing session found')

First differing element 0:
9
6

- (9, 'Existing session found')
?  ^

+ (6, 'Existing session found')
?  ^


======================================================================
FAIL: test_session_name_set (tracspamfilter.filters.tests.session.SessionFilterStrategyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rjollos/Documents/Workspace/trac-dev/spam-filter/tracspamfilter/filters/tests/session.py", line 37, in test_session_name_set
    self.assertEqual((6, 'Existing session found'), retval)
AssertionError: Tuples differ: (6, 'Existing session found') != (4, 'Existing session found')

First differing element 0:
6
4

- (6, 'Existing session found')
?  ^

+ (4, 'Existing session found')
?  ^


----------------------------------------------------------------------
Ran 32 tests in 0.277s

FAILED (failures=5)

Attachments (0)

Change History (3)

comment:1 by Ryan J Ollos, 8 years ago

Resolution: fixed
Status: newclosed

Test cases fixed in [14561]. I assume those values are correct for the change made in r14543, but you may want to confirm. You may also be able to provide a better Release Notes entry than what I copied from the commit message, since I know little about this change.

comment:2 by Ryan J Ollos, 8 years ago

Release Notes: modified (diff)

One-line change in [14556]. I'll just make a note of here and add to Release Notes so I don't have to create a ticket.

comment:3 by Dirk Stöcker, 8 years ago

Rationale of this change: In the past spam bots usually did not create a Session before submissions. Now they do. So the test has a high number (more than 70%) of false positives. Thus I reduced the impact. I did not remove it, as it still has some positive effects for HAM.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Dirk Stöcker.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Dirk Stöcker to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.