fix(core): update

This commit is contained in:
2022-07-27 22:42:08 +02:00
parent bd9b3bb985
commit af3d461593
7 changed files with 53 additions and 20 deletions

View File

@ -5,10 +5,8 @@ let testClickhouseDb: smartclickhouse.SmartClickHouseDb;
tap.test('first test', async () => {
testClickhouseDb = new smartclickhouse.SmartClickHouseDb({
host: 'localhost',
url: 'http://localhost:8123',
database: 'test2',
port: 8123,
protocol: 'http',
});
});
@ -16,10 +14,10 @@ tap.test('should start the clickhouse db', async () => {
await testClickhouseDb.start(true);
});
tap.test('should create a timedatatable', async () => {
tap.test('should create a timedatatable', async (toolsArg) => {
const table = await testClickhouseDb.getTable('analytics');
let i = 0;
while(i < 10) {
while(i < 5000) {
await table.addData({
timestamp: Date.now(),
message: `hello this is a message ${i}`,
@ -30,6 +28,8 @@ tap.test('should create a timedatatable', async () => {
}
});
i++;
console.log(`logged ${i} of 5000 lines.`);
await toolsArg.delayFor(1);
}
});