apache / couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
https://couchdb.apache.org/
Apache License 2.0
6.27k stars 1.03k forks source link

Add clouseau_rpc_test #5324

Closed jiahuili430 closed 3 weeks ago

jiahuili430 commented 3 weeks ago

Overview

Add tests for clouseau_rpc.erl.

Testing recommendations

Enable clouseau, and then run make eunit

./configure --dev --disable-spidermonkey
make
make eunit-search

Related Issues or Pull Requests

Checklist

rnewson commented 3 weeks ago

I realise this is draft but I have a concern. A lot of this test appears to be asserting the internals of the implementation, rather than testing that it works functionally. The cut-and-paste of records from the implementation, etc. Before you spend much more time on this I think it's worth reassessing the purpose of eunit tests.

rnewson commented 3 weeks ago

the peculiar line in the makefile target that uses find to delete a beam file is a concern also. that is a very unusual way to disable a test (and won't work on Windows, though perhaps you intend a variation when you updated Makefile.win). I don't think it's the right way.

jiahuili430 commented 3 weeks ago

Trying to use this test to compare the differences between different Clouseau. If it doesn't work on Windows, I'll drop this PR. Thank you for the heads up! @rnewson