The slow test

Adam Schmideg
Togethereum
Published in
2 min readApr 21, 2022
Starryai

It takes 8 seconds to run a single test and slightly more to run them all. I can measure the hell out of them, but whatever is slow it happens before. The startup phase is inaccessible to mere mortals like the internals of modern radios (do they still exist? they booted fast).

The damn thing needs a morning coffee. I sympathize with it and google for the symptom but no one seems to have similar complaints. I’m about to surrender to slowness, a colleague helps me out. He explains reading data from outdated records can lead to strange result. The program clears the database first. Modern version of not pouring new wine into old wineskins.

Makes sense in general but I know what I’m doing, just run my test without cleaning the house. In an ideal world, there is a command line switch --dontBeSmart. But you know where we are living.

It takes 8 seconds of my life every time to run the test. Too short to use it for anything else. The best I can do is watch the monitor and get annoyed. I made a calculation to give some work to my brain cells. Suppose I run the test a hundred times (why would I, it’s a lot, but suppose) that adds up to almost 14 minutes. If I implement a poor man’s dontBeSmart in ten minutes, I’ll save some time.

Your guess is correct. It took me an hour. I’m lying, foremost to myself. It took almost two hours. I learned a lot along the way, it was a time well wasted. But still, where is the victory I should be feeling?

--

--