Skip to content

Commit

Permalink
test: make the integer obvious in mysql tests (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
rauno56 authored Jun 17, 2022
1 parent 68cf014 commit 69efe64
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ describe('[email protected]', () => {
it('should intercept connection.execute(text: string, values: [], callback)', done => {
const span = provider.getTracer('default').startSpan('test span');
context.with(trace.setSpan(context.active(), span), () => {
const sql = 'SELECT ? as solution';
const sql = 'SELECT 1+? as solution';
connection.execute(sql, [1], (err, res: mysqlTypes.RowDataPacket[]) => {
assert.ifError(err);
assert.ok(res);
assert.strictEqual(res[0].solution, 1);
assert.strictEqual(res[0].solution, 2);
const spans = memoryExporter.getFinishedSpans();
assert.strictEqual(spans.length, 1);
assertSpan(spans[0], sql, [1]);
Expand All @@ -398,11 +398,11 @@ describe('[email protected]', () => {
it('should intercept connection.execute(text: string, value: any, callback)', done => {
const span = provider.getTracer('default').startSpan('test span');
context.with(trace.setSpan(context.active(), span), () => {
const sql = 'SELECT ? as solution';
const sql = 'SELECT 1+? as solution';
connection.execute(sql, [1], (err, res: mysqlTypes.RowDataPacket[]) => {
assert.ifError(err);
assert.ok(res);
assert.strictEqual(res[0].solution, 1);
assert.strictEqual(res[0].solution, 2);
const spans = memoryExporter.getFinishedSpans();
assert.strictEqual(spans.length, 1);
assertSpan(spans[0], sql, [1]);
Expand Down Expand Up @@ -701,11 +701,11 @@ describe('[email protected]', () => {
it('should intercept pool.execute(text: string, values: [], callback)', done => {
const span = provider.getTracer('default').startSpan('test span');
context.with(trace.setSpan(context.active(), span), () => {
const sql = 'SELECT ? as solution';
const sql = 'SELECT 1+? as solution';
pool.execute(sql, [1], (err, res: mysqlTypes.RowDataPacket[]) => {
assert.ifError(err);
assert.ok(res);
assert.strictEqual(res[0].solution, 1);
assert.strictEqual(res[0].solution, 2);
const spans = memoryExporter.getFinishedSpans();
assert.strictEqual(spans.length, 1);
assertSpan(spans[0], sql, [1]);
Expand All @@ -717,11 +717,11 @@ describe('[email protected]', () => {
it('should intercept pool.execute(text: string, value: any, callback)', done => {
const span = provider.getTracer('default').startSpan('test span');
context.with(trace.setSpan(context.active(), span), () => {
const sql = 'SELECT ? as solution';
const sql = 'SELECT 1+? as solution';
pool.execute(sql, [1], (err, res: mysqlTypes.RowDataPacket[]) => {
assert.ifError(err);
assert.ok(res);
assert.strictEqual(res[0].solution, 1);
assert.strictEqual(res[0].solution, 2);
const spans = memoryExporter.getFinishedSpans();
assert.strictEqual(spans.length, 1);
assertSpan(spans[0], sql, [1]);
Expand Down

0 comments on commit 69efe64

Please sign in to comment.