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

Method storeRuleMege

test/tree/TestTreeRule.java:248–262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246 }
247
248 @Test
249 public void storeRuleMege() throws Exception {
250 setupStorage();
251 final TreeRule rule = new TreeRule(1);
252 rule.setLevel(2);
253 rule.setOrder(1);
254 rule.setNotes("Just some notes");
255 assertTrue(rule.syncToStorage(storage.getTSDB(), false).joinUninterruptibly());
256 assertEquals(2, storage.numColumns(TREE_TABLE, new byte[] { 0, 1 }));
257 final TreeRule stored = JSON.parseToObject(
258 storage.getColumn(TREE_TABLE, new byte[] { 0, 1 }, Tree.TREE_FAMILY(),
259 "tree_rule:2:1".getBytes(MockBase.ASCII())), TreeRule.class);
260 assertEquals("Host owner", stored.getDescription());
261 assertEquals("Just some notes", stored.getNotes());
262 }
263
264 @Test (expected = IllegalArgumentException.class)
265 public void storeRuleBadID0() throws Exception {

Callers

nothing calls this directly

Calls 14

setupStorageMethod · 0.95
setLevelMethod · 0.95
setOrderMethod · 0.95
setNotesMethod · 0.95
syncToStorageMethod · 0.95
parseToObjectMethod · 0.95
TREE_FAMILYMethod · 0.95
ASCIIMethod · 0.95
getDescriptionMethod · 0.95
getNotesMethod · 0.95
getTSDBMethod · 0.80
numColumnsMethod · 0.80

Tested by

no test coverage detected