Opened 15 years ago

Closed 15 years ago

#2766 defect closed fixed (fixed)

test_sslverify uses deprecated function log.flushErrors

Reported by: therve Owned by:
Priority: highest Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

We should remove these calls. It also needs a bit of cleanups, like removing tabs in it.

Change History (23)

comment:1 Changed 15 years ago by therve

(In [20916]) * Remove calls to flushErrors

  • 80 cols
  • Remove tabs
  • Remove trailing whitespaces
  • Support lack of pyOpenSSL

Refs #2766

comment:2 Changed 15 years ago by therve

Priority: normallow

Work is done in est-sslverify-cleanups-2766, will push for review later.

comment:3 Changed 15 years ago by therve

Branch is test-sslverify-cleanups-2766

comment:4 Changed 15 years ago by therve

Type: enhancementdefect

comment:5 Changed 15 years ago by therve

Keywords: review added
Owner: therve deleted
Priority: lowhighest

comment:6 Changed 15 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to therve

Man, tabs.

Some tests changed without getting docstrings:

  • testAbbreviatingDistinguishedNames
  • testAllowedAnonymousClientConnection
  • testRefusedAnonymousClientConnection
  • testFailedCertificateVerification
  • testSuccessfulCertificateVerification
  • testSuccessfulSymmetricSelfSignedCertificateVerification
  • testVerification

Otherwise generally looks good. It might be nice to define the skips inside the test case definitions instead of adding them to the end.

comment:7 Changed 15 years ago by therve

(In [21295]) Add some docstrings

Refs #2766

comment:8 Changed 15 years ago by therve

Keywords: review added
Owner: therve deleted

Back to review.

comment:9 Changed 15 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to therve

OpenSSLOptions.skip is set in two places now, and Constructor.skip isn't set anywhere.

comment:10 Changed 15 years ago by therve

Keywords: review added
Owner: changed from therve to Jean-Paul Calderone

Damn, sorry, I replaced it. Is it ok to merge now ?

comment:11 Changed 15 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to therve

Looks good

comment:12 Changed 15 years ago by therve

Resolution: fixed
Status: newclosed

(In [21389]) Merge test-sslverify-cleanups-2766

Author: therve Reviewer: exarkun Fixes #2766

Make some cleanups in twisted.test.test_sslverify:

  • Replace call to flushErrors
  • Remove tabs, trailing whitespaces
  • Support lack of PyOpenSSL
  • Add some docstrings

comment:13 Changed 15 years ago by therve

(In [21390]) Revert r21389: regressions under win32

Refs #2766

comment:14 Changed 15 years ago by therve

Resolution: fixed
Status: closedreopened

There is an error on the win32 slaves:

[ERROR]: twisted.test.test_sslverify.OpenSSLOptions.test_refusedAnonymousClientConnection

Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion.

comment:15 Changed 15 years ago by therve

Keywords: review added
Owner: therve deleted
Status: reopenednew

That should be better now.

comment:16 Changed 15 years ago by radix

Keywords: review removed
Owner: set to therve

I'm unhappy with the stuff in setUp. What do you think of storing those keys in strings or on the filesystem? I'm happy with your fixes for the win32 test failures.

comment:17 in reply to:  16 Changed 15 years ago by therve

Replying to radix:

I'm unhappy with the stuff in setUp. What do you think of storing those keys in strings or on the filesystem?

I don't think it brings something. I see 2 options:

  • generate keys of size 512 instead of 1024, it's much faster
  • keep on generating keys of 1024 for each test, it's just a little bit more slower.

To give an idea, with 512 the tests take roughly 2 secs, and 5 with 1024 (1.2 with current version).

comment:18 Changed 15 years ago by therve

(In [21621]) Use keys of length 512.

Refs #2766

comment:19 Changed 15 years ago by therve

Keywords: review added
Owner: therve deleted

I went on and did the first solution. Back to review (in test-sslverify-cleanups-2766).

comment:20 Changed 15 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to therve

Unshared state is great. The slowdown is okay for now I think. I kind of like the idea of keeping certs for the test on disk, but that's a separate issue.

Tests pass on Windows now, it seems, and still work on Linux. The Win32 ConnectionLost behavior is a bug we should fix, I suppose (although man, screw Windows). Please file a ticket for that and reference it in the comment above cResult.trap.

Do that, then merge.

comment:21 Changed 15 years ago by therve

(In [21629]) Mention the ticket in the comment

Refs #2766

comment:22 Changed 15 years ago by therve

Resolution: fixed
Status: newclosed

(In [21630]) Merge test-sslverify-cleanups-2766

Author: therve Reviewer: exarkun Fixes #2766

Make some cleanups in twisted.test.test_sslverify:

  • Replace call to flushErrors
  • Remove tabs, trailing whitespaces
  • Support lack of PyOpenSSL
  • Add some docstrings

comment:23 Changed 11 years ago by <automation>

Owner: therve deleted
Note: See TracTickets for help on using tickets.