File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
src/test/java/org/typesense/api Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .typesense .api ;
2+
3+ import junit .framework .TestCase ;
4+ import org .typesense .resources .Node ;
5+
6+ import java .time .Duration ;
7+ import java .util .ArrayList ;
8+ import java .util .HashMap ;
9+
10+ public class HealthAndOperationsTest extends TestCase {
11+
12+ private Client client ;
13+ private Helper helper ;
14+
15+ public void setUp () throws Exception {
16+ super .setUp ();
17+ helper = new Helper ();
18+ client = helper .getClient ();
19+ }
20+
21+ public void tearDown () throws Exception {
22+ super .tearDown ();
23+ helper .teardown ();
24+ }
25+
26+ public void testRetrieve () {
27+ System .out .println (this .client .health .retrieve ());
28+ }
29+
30+ public void testPerformSnapshot (){
31+ HashMap <String , String > query = new HashMap <>();
32+ query .put ("snapshot_path" ,"/tmp/typesense-data-snapshot" );
33+ System .out .println (client .operations .perform ("snapshot" ,query ));
34+ }
35+
36+ public void testPerformVote (){
37+ System .out .println (client .operations .perform ("vote" ));
38+ }
39+
40+ public void testMetrics (){
41+ System .out .println (client .metrics .retrieve ());
42+ }
43+
44+ public void testDebug (){
45+ System .out .println (client .debug .retrieve ());
46+ }
47+ }
You can’t perform that action at this time.
0 commit comments