celestiaorg / celestia-node

Celestia Data Availability Nodes
Apache License 2.0
926 stars 925 forks source link

fix(tests): abstract test time intervals to constants with explanations #1273

Open distractedm1nd opened 2 years ago

distractedm1nd commented 2 years ago

Our tests pass in random time intervals very often.

_Originally posted by @distractedm1nd in https://github.com/celestiaorg/celestia-node/pull/1256#discussion_r1003437837_

MSevey commented 2 years ago

As we work through extracting testing timing constants we should also consider making a number of the timeout constants build.Vars so that we can have production and testing values. In production these values can be used to prevent long running events from hanging and just return an error instead of waiting.

Or to generalize it more, we should minimize testing only constraints.