Skip to content

reuse cluster in pytests #1466

@gilcu3

Description

@gilcu3

Background

at the moment each pytest creates its own cluster, which is an expensive operation. Pytests such as:

  • test_ckd_verification
  • test_parallel_sign_calls
  • test_requests
  • test_web_endpoints

could reuse the cluster without affecting their outcome or effectiveness. This is not easy because of how neard works, if the tests that share the same cluster are not run sequentially, then the cluster collides with the clusters created for other tests. A possible solution is to put all of these tests under the same module.

Another one is fixing nearcore pytests, but it is deprecated so probably not the best choice now. One more option is monkeypatching, but that might not work as it cannot handle port collisions afaik.

User Story

I want faster CI

Acceptance Criteria

The pytests are modified so that as many of them share the cluster as possible.

Resources & Additional Notes

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions