Skip to content

Occasional InvalidSignature in tests. #2150

@jMyles

Description

@jMyles

I imagine we've all seen it: the tests pass, but a stray traceback for an unhandled InvalidSignature appears in the console.

As of #1741, this error is sometimes raised (if it occurs from a seednode) - in fact, it can cause the test suite to hang entirely.

Essentially, the problem is this (I initially thought it was limited to tests, now I think it's possible that this will occur in production):

Sometimes, a Learner begins to discover just as fixtures are being torn down and re-built for a subsequent test. The old Ursula (whom the Learner thought it was discovering) is gone, and a new one is now operating at the port in question. When the Learner connects, it is able to successfully get_nodes_via_rest, but the signature on the node payload is from the new Ursula, and thus does not match the stamp of the previous one. Thus, InvalidSignature.

Obviously this is a symptom of a deeper problem. Any Character which stops needs to actively cancel its activities (not just abort subsequent iterations).

Metadata

Metadata

Assignees

Labels

Is this done?Ambiguous closing requirements may already be metTest 🔍Tests only

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions