[erlang-questions] Know if running in CT

Roberto Ostinelli roberto.ostinelli@REDACTED
Thu Dec 10 19:16:48 CET 2015

I need to ensure that a disconnected ct slave node waits until it is connected to the main ct node to send a message back to the process running the test. Otherwise this message gets lost and the test does not pass. 

No need to get too much in the details here, but believe me I've tried all possible options. 

Thank you for your inputs :)

> On 10 dic 2015, at 18:57, Roger Lipscombe <roger@REDACTED> wrote:
>> On 10 December 2015 at 17:52, Roberto Ostinelli <roberto@REDACTED> wrote:
>> Thank you Jesper,
>> I *very* rarely do it. However, I'm in need to slow down a node to allow for
>> distributed tests to work.
> IntervalMs = application:get_env(?APPLICATION, furtle_interval_ms, 10).
> Because you never know when you'll need to change the furtling
> interval in production.
> But, if you're needing to slow things down to allow distributed tests
> to work, you've got a race condition, and sleeps (effectively) are a
> band-aid. You should be waiting for (whatever) to finish before moving
> on. We do this, mostly, by repeated polling and, occasionally, by
> waiting for events.
> Unless you're deliberately inducing race conditions and _that's_ why
> you need the slowness, of course...

More information about the erlang-questions mailing list