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

Method testHashCodeandNotEquals

test/stats/TestQueryStats.java:171–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169 }
170
171 @Test
172 public void testHashCodeandNotEquals() throws Exception {
173 final TSQuery query = new TSQuery();
174 query.setStart("1h-ago");
175 final QueryStats stats = new QueryStats(remote, query, headers);
176 assertNotNull(stats);
177 final int hash_a = stats.hashCode();
178
179 final TSQuery query2 = new TSQuery();
180 query2.setStart("2h-ago");
181 final QueryStats stats2 = new QueryStats(remote, query2, headers);
182 assertNotNull(stats);
183 assertTrue(hash_a != stats2.hashCode());
184 assertFalse(stats.equals(stats2));
185 assertFalse(stats == stats2);
186 }
187
188 @Test
189 public void testEqualsNull() throws Exception {

Callers

nothing calls this directly

Calls 3

setStartMethod · 0.95
hashCodeMethod · 0.95
equalsMethod · 0.95

Tested by

no test coverage detected