[erlang-questions] Best practices for QAing distribution?

Sergej Jurecko <>
Tue Nov 25 20:13:39 CET 2014


What I do in ActorDB is use eunit and start up slave nodes when running tests.
On test setup create nodes, then use rpc:call to execute code. You can take down nodes at any time and start them back up to test nodes dropping.

This way of testing will tell you a lot but is not the whole story. Distributed computation can often be dependent on timings and running slave nodes can mislead you. When you get around to running code on actual networked servers, timings can be very different.

You also can not test behaviour of bad networking conditions. What will happen if your network is dropping connections randomly, experiencing packet loss, etc. 

It would be awesome if erlang distribution offered some test option of connecting nodes “poorly”. In that mode it would do random disconnects, delays in data delivery, etc. Anything that could happen in an actual network.

I guess you could do some sort of automated testing using docker. This is a half baked idea I have that I should get around to trying one of these days.


Sergej

On 25 Nov 2014, at 18:18, Christopher Phillips <> wrote:

> 
> Does anyone have a library or a set of best practices for testing netsplits? I.e., given a couple nodes, create a netsplit between them and see what one's distributed application ~really~ does in such a situation? I've looked around a bit online but my google-fu has failed me, as I wasn't able to find anything that seemed to do what I'm looking for, either in Erlang specifically, or just in a general application sense (there's Jepsen, but that seems geared for testing generic distribution libraries in a basic sense, rather than domain specific code, and I'm not very good with Clojure) which seems...odd. I've got some ideas,  but figured I'd ask around to see if anyone has done anything similar first.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list