()
| 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 { |
nothing calls this directly
no test coverage detected