Skip to content

Commit 86391ad

Browse files
committed
fixup
1 parent 096cf25 commit 86391ad

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/functional/v2/task/testIngestShards.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ describe('Test IngestShards', function () {
170170
const results = await warp10.fetch({
171171
className: 'utapi.event', labels: { node: prefix }, start: start + 1, stop: -2,
172172
});
173-
const series = JSON.parse(results.result[0])[0];
173+
const series = results.result[0];
174174
const timestamps = series.v.map(ev => ev[0]);
175175
assert.deepStrictEqual([
176176
start + 1,
@@ -214,7 +214,7 @@ describe('Test IngestShards', function () {
214214
className: 'utapi.event', labels: { node: prefix }, start: start + 10, stop: -2,
215215
});
216216

217-
const series = JSON.parse(results.result[0])[0];
217+
const series = results.result[0];
218218
const timestamps = series.v.map(ev => ev[0]);
219219
assert.deepStrictEqual([
220220
start + 5,

tests/functional/v2/warp10/testClient.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Test Warp Client', () => {
2727
it('should fetch records', async () => {
2828
await warp10.ingest({ className }, testValues);
2929
const res = await warp10.fetch({ className, start: `${new Date().getTime()}000`, stop: -100 });
30-
const parsed = JSON.parse(res.result[0])[0];
30+
const parsed = res.result[0];
3131
assert.strictEqual(parsed.c, className);
3232
assert.deepStrictEqual(
3333
parsed.v.map(v => v[0]),
@@ -44,10 +44,10 @@ describe('Test Warp Client', () => {
4444
const ev = generateFakeEvents(startTime, endTime, 100);
4545
const count = await warp10.ingest({ className }, ev);
4646
let fetchResp = await warp10.fetch({ className, start: endTime, stop: startTime });
47-
assert.strictEqual(JSON.parse(fetchResp.result[0]).length, 1);
48-
assert.strictEqual(JSON.parse(fetchResp.result[0])[0].v.length, count);
47+
assert.strictEqual(fetchResp.result[0].length, 1);
48+
assert.strictEqual(fetchResp.result[0].v.length, count);
4949
await warp10.delete({ className, start: startTime, end: endTime });
5050
fetchResp = await warp10.fetch({ className, start: endTime, stop: startTime });
51-
assert.strictEqual(JSON.parse(fetchResp.result[0]).length, 0);
51+
assert.strictEqual(fetchResp.result[0].length, 0);
5252
});
5353
});

0 commit comments

Comments
 (0)