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

Method before

test/tools/TestUID.java:76–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 }
75
76 @Before
77 public void before() throws Exception {
78 PowerMockito.mockStatic(Threads.class);
79 PowerMockito.when(Threads.newTimer(anyString())).thenReturn(timer);
80 PowerMockito.when(Threads.newTimer(anyInt(), anyString())).thenReturn(timer);
81
82 PowerMockito.whenNew(HashedWheelTimer.class).withNoArguments()
83 .thenReturn(timer);
84 PowerMockito.whenNew(HBaseClient.class).withAnyArguments()
85 .thenReturn(client);
86
87 config = new Config(false);
88 tsdb = new TSDB(client, config);
89 PowerMockito.spy(System.class);
90 PowerMockito.when(System.nanoTime())
91 .thenReturn(1357300800000000L)
92 .thenReturn(1357300801000000L)
93 .thenReturn(1357300802000000L)
94 .thenReturn(1357300803000000L);
95 PowerMockito.when(System.currentTimeMillis())
96 .thenReturn(1357300800000L)
97 .thenReturn(1357300801000L)
98 .thenReturn(1357300802000L)
99 .thenReturn(1357300803000L);
100 setupMockBase();
101 }
102
103 /* FSCK --------------------------------------------
104 * The UID FSCK is concerned with making sure the UID table is in a clean state.

Callers

nothing calls this directly

Calls 4

newTimerMethod · 0.95
setupMockBaseMethod · 0.95
nanoTimeMethod · 0.45
currentTimeMillisMethod · 0.45

Tested by

no test coverage detected