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

Method testHashCodeandEqualsMSResolution

test/core/TestTSQuery.java:543–560  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

541 }
542
543 @Test
544 public void testHashCodeandEqualsMSResolution() {
545 TSQuery sub1 = getMetricForValidate();
546
547 final int hash_a = sub1.hashCode();
548 sub1.setMsResolution(true);
549 final int hash_b = sub1.hashCode();
550 assertTrue(hash_a != hash_b);
551 sub1.validateAndSetQuery();
552 assertEquals(hash_b, sub1.hashCode());
553
554 TSQuery sub2 = getMetricForValidate();
555 sub2.setMsResolution(true);
556
557 assertEquals(hash_b, sub2.hashCode());
558 assertEquals(sub1, sub2);
559 assertFalse(sub1 == sub2);
560 }
561
562 @Test
563 public void testHashCodeandEqualsNewSubQuery() {

Callers

nothing calls this directly

Calls 4

getMetricForValidateMethod · 0.95
hashCodeMethod · 0.95
setMsResolutionMethod · 0.95
validateAndSetQueryMethod · 0.95

Tested by

no test coverage detected