<div dir="ltr"><div>Hi, first time poster (but I've read many threads in here).</div><div><br></div><div>How does one usually test gen_statem internal timer events?</div><div>Usually you test the effects of the behaviour somehow, and I can test that. But in this particular case I had a situation where timers with uniq references are created, later on they usually get removed and all is fine - they're created for each extra worker started and at some point the worker is removed by the timer event that trigger checking some conditions.</div><div><br></div><div>I noticed after that, the way I had written it, if an extra worker was started then died for some other reason than the timer event taking it out, I could theoretically accumulate timers that wouldn't be removed, I've since then corrected that but still I have no tests ensuring me that it actually works. </div><div>So my question is if there's any even way to test it (even if with tracing)?</div><div>Thanks</div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><b>M</b>icael <b>N</b>ussbaumer</div><div></div><div dir="ltr"><a href="http://cargocollective.com/micaelnussbaumer" target="_blank">artistic portfolio</a></div></div></div></div></div></div></div></div>