MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / before

Method before

test/query/TestQueryLimitOverride.java:63–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 private File file;
62
63 @Before
64 public void before() throws Exception {
65 tsdb = PowerMockito.mock(TSDB.class);
66 config = new Config(false);
67 timer = mock(HashedWheelTimer.class);
68 PowerMockito.when(tsdb.getTimer()).thenReturn(timer);
69 when(tsdb.getConfig()).thenReturn(config);
70 PowerMockito.mockStatic(Files.class);
71 file = mock(File.class);
72 PowerMockito.whenNew(File.class).withAnyArguments().thenReturn(file);
73
74 config.overrideConfig("tsd.query.limits.bytes.default", "42");
75 config.overrideConfig("tsd.query.limits.data_points.default", "24");
76 config.overrideConfig("tsd.query.limits.overrides.config", "/tmp/overrides.json");
77 }
78
79 @Test
80 public void ctorNoFileConfigured() throws Exception {

Callers

nothing calls this directly

Calls 3

getTimerMethod · 0.80
getConfigMethod · 0.45
overrideConfigMethod · 0.45

Tested by

no test coverage detected