AleoNet / snarkVM

A Virtual Machine for Zero-Knowledge Executions
https://snarkvm.org
Apache License 2.0
1.08k stars 1.5k forks source link

[Bug] #2549

Open 0xShankar opened 2 months ago

0xShankar commented 2 months ago

Improving Reliability of Tests in CI Pipeline (snarkVM)

Issue: Flaky Tests during CI

Description:

I've noticed intermittent test failures in the CI pipeline, particularly around the networking module during stress tests.

These failures seem environment-specific and could be related to race conditions or timing issues within the test suite.

Suggested Improvement:

  1. Introduce Timeouts: For some tests that are highly dependent on network conditions, applying timeouts and ensuring async handling is more robust could reduce the occurrence of flaky tests.
  2. Test Isolation: Consider isolating integration tests from unit tests in separate pipelines. This will help pinpoint whether the issue is network-related or logic-related. 3.Mock Network Conditions: Integrate a mocking library for network conditions, such as tokio-test, to simulate failures or timeouts without depending on external environments.

These steps should improve the stability of the CI pipeline and reduce the need for reruns.