Closed tinchodias closed 4 years ago
Note about the word "Test" in the MongoTestServer
: This class (and MongoTestReplicaSet
too) starts "real" mongod
instances; I mean, they are not mocks or something like that only useful for testing. I used "Test" because I don't think they can be used with other purposes than creating testing scenarios or benchmarking.
I think this PR doesn't hurt anyone. The only limitation I can see is that OSSubprocess doesn't support Windows AFAIK, yet.
I discovered a problem with the "initial" changes: Voyage has the "multiple image tests", that install ImageWorker, that install OSProcess (CommandShell project), and it seems to be incompatible to have both in the same image (OSProcess and OSSubprocess).
My motivation to implement these MongoTestServer is to simplify signalling to the mongod processes and simulate in some way errors in replica set servers. The same can be done with OSProcess so... I have push these changes.
Any opinion, @estebanlm ?
Mmm. MMM... I guess is fine for now. We need to find a way to make OSProcess and OSSubprocess to coexist.
Thanks! then I we can merge it.
Now starting a server is very handy, as this example code shows (available in class side of
MongoTestServer
):or this code:
(in
MongoReplicationTestResources class>>#start
)