fix(core): update
This commit is contained in:
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user