It turned out, that this test suite tested returned
formated string from YANGTools, which format was not
part of API Contract.
Updated test to test to only for non nulls, which
are parts of API Contract.
Change-Id: I6e33993928667c6e8b4a830b6d0a9c8d10cd4fa2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
package org.opendaylight.controller.md.sal.dom.broker.impl.jmx;
import static org.junit.Assert.assertEquals;
package org.opendaylight.controller.md.sal.dom.broker.impl.jmx;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.opendaylight.yangtools.util.DurationStatsTracker;
import org.junit.Test;
import org.opendaylight.yangtools.util.DurationStatsTracker;
commitStatsTracker.addDuration(100);
commitStatsTracker.addDuration(100);
- String prefix = "100.0 ns";
assertEquals("getTotalCommits", 1L, bean.getTotalCommits());
assertEquals("getTotalCommits", 1L, bean.getTotalCommits());
- assertEquals("getLongestCommitTime starts with \"" + prefix + "\"", true,
- bean.getLongestCommitTime().startsWith("100.0 ns"));
- assertEquals("getShortestCommitTime starts with \"" + prefix + "\"", true,
- bean.getShortestCommitTime().startsWith(prefix));
- assertEquals("getAverageCommitTime starts with \"" + prefix + "\"", true,
- bean.getAverageCommitTime().startsWith(prefix));
+ assertNotNull(bean.getLongestCommitTime());
+ assertNotNull(bean.getShortestCommitTime());
+ assertNotNull(bean.getAverageCommitTime());