...
|
...
|
@@ -36,3 +36,30 @@ test('test normal send message', t => { |
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
test('test normal send message immediately', t => {
|
|
|
const sender = new Sender({
|
|
|
host: 'localhost',
|
|
|
port: 3003,
|
|
|
db: 'test',
|
|
|
measurement: 'test2',
|
|
|
immediate: true
|
|
|
});
|
|
|
|
|
|
sender.addMessage({
|
|
|
tags: {
|
|
|
a: 'a',
|
|
|
b: 'b'
|
|
|
},
|
|
|
fields: {
|
|
|
a: 'a',
|
|
|
b: 'b'
|
|
|
}
|
|
|
});
|
|
|
|
|
|
sender.on('ok', code => {
|
|
|
t.is(code, 204);
|
|
|
});
|
|
|
|
|
|
}); |
...
|
...
|
|