Reduced timeouts by 10x
[invirt/third/libt4.git] / rsm_tester.cc
1 //
2 // RSM test client
3 //
4
5 #include "types.h"
6 #include "rsm_protocol.h"
7 #include "rsmtest_client.h"
8
9 char log_thread_prefix = 't';
10
11 int main(int argc, char *argv[]) {
12     if(argc != 4){
13         cerr << "Usage: " << argv[0] << " [host:]port [partition] arg" << endl;
14         return 1;
15     }
16
17     rsmtest_client *lc = new rsmtest_client(argv[1]);
18     string command(argv[2]);
19     if (command == "partition") {
20         cout << "net_repair returned " << lc->net_repair(stoi(argv[3]));
21     } else if (command == "breakpoint") {
22         int b = stoi(argv[3]);
23         cout << "breakpoint " << b << " returned " << lc->breakpoint(b);
24     } else {
25         cerr << "Unknown command " << argv[2] << endl;
26     }
27     return 0;
28 }