Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Jan 8, 2025
1 parent 096cf25 commit 86391ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/functional/v2/task/testIngestShards.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ describe('Test IngestShards', function () {
const results = await warp10.fetch({
className: 'utapi.event', labels: { node: prefix }, start: start + 1, stop: -2,
});
const series = JSON.parse(results.result[0])[0];
const series = results.result[0];
const timestamps = series.v.map(ev => ev[0]);
assert.deepStrictEqual([
start + 1,
Expand Down Expand Up @@ -214,7 +214,7 @@ describe('Test IngestShards', function () {
className: 'utapi.event', labels: { node: prefix }, start: start + 10, stop: -2,
});

const series = JSON.parse(results.result[0])[0];
const series = results.result[0];
const timestamps = series.v.map(ev => ev[0]);
assert.deepStrictEqual([
start + 5,
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/v2/warp10/testClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Test Warp Client', () => {
it('should fetch records', async () => {
await warp10.ingest({ className }, testValues);
const res = await warp10.fetch({ className, start: `${new Date().getTime()}000`, stop: -100 });
const parsed = JSON.parse(res.result[0])[0];
const parsed = res.result[0];
assert.strictEqual(parsed.c, className);
assert.deepStrictEqual(
parsed.v.map(v => v[0]),
Expand All @@ -44,10 +44,10 @@ describe('Test Warp Client', () => {
const ev = generateFakeEvents(startTime, endTime, 100);
const count = await warp10.ingest({ className }, ev);
let fetchResp = await warp10.fetch({ className, start: endTime, stop: startTime });
assert.strictEqual(JSON.parse(fetchResp.result[0]).length, 1);
assert.strictEqual(JSON.parse(fetchResp.result[0])[0].v.length, count);
assert.strictEqual(fetchResp.result[0].length, 1);
assert.strictEqual(fetchResp.result[0].v.length, count);
await warp10.delete({ className, start: startTime, end: endTime });
fetchResp = await warp10.fetch({ className, start: endTime, stop: startTime });
assert.strictEqual(JSON.parse(fetchResp.result[0]).length, 0);
assert.strictEqual(fetchResp.result[0].length, 0);
});
});

0 comments on commit 86391ad

Please sign in to comment.