MCPcopy
hub / github.com/OpenTSDB/opentsdb / loadHttpRpcPlugins

Method loadHttpRpcPlugins

test/tsd/TestRpcManager.java:69–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 @Test
70 public void loadHttpRpcPlugins() throws Exception {
71 Config config = mock(Config.class);
72 when(config.hasProperty("tsd.http.rpc.plugins"))
73 .thenReturn(true);
74 when(config.getString("tsd.http.rpc.plugins"))
75 .thenReturn("net.opentsdb.tsd.DummyHttpRpcPlugin");
76 when(config.getString("tsd.core.enable_api"))
77 .thenReturn("true");
78 when(config.getString("tsd.core.enable_ui"))
79 .thenReturn("true");
80 when(config.getString("tsd.no_diediedie"))
81 .thenReturn("false");
82
83 TSDB tsdb = mock(TSDB.class);
84 when(tsdb.getMode()).thenReturn(OperationMode.READWRITE);
85 when(tsdb.getConfig()).thenReturn(config);
86
87 PluginLoader.loadJAR("plugin_test.jar");
88 mgr_under_test = RpcManager.instance(tsdb);
89
90 HttpRpcPlugin plugin = mgr_under_test.lookupHttpRpcPlugin("dummy/test");
91 assertNotNull(plugin);
92 }
93
94 @Test
95 public void loadRpcPlugin() throws Exception {

Callers

nothing calls this directly

Calls 7

hasPropertyMethod · 0.95
getStringMethod · 0.95
getModeMethod · 0.95
getConfigMethod · 0.95
loadJARMethod · 0.95
instanceMethod · 0.95
lookupHttpRpcPluginMethod · 0.80

Tested by

no test coverage detected