@@ -40,7 +40,6 @@ const database = process.env.MYSQL_DATABASE || 'test_db';
4040const host = process . env . MYSQL_HOST || '127.0.0.1' ;
4141const user = process . env . MYSQL_USER || 'otel' ;
4242const password = process . env . MYSQL_PASSWORD || 'secret' ;
43- const rootPassword = process . env . MYSQL_ROOT_PASSWORD || 'rootpw' ;
4443
4544const instrumentation = new MySQLInstrumentation ( ) ;
4645instrumentation . enable ( ) ;
@@ -49,16 +48,6 @@ instrumentation.disable();
4948import * as mysqlTypes from 'mysql' ;
5049import { AttributeNames } from '../src/AttributeNames' ;
5150
52- // Helper function to setup the database
53- const execPromise = ( conn : mysqlTypes . Connection , command : string ) => {
54- return new Promise < void > ( ( res , rej ) => {
55- conn . query ( command , err => {
56- if ( err ) rej ( err ) ;
57- else res ( ) ;
58- } ) ;
59- } ) ;
60- } ;
61-
6251describe ( '[email protected] ' , ( ) => { 6352 let contextManager : AsyncLocalStorageContextManager ;
6453 let connection : mysqlTypes . Connection ;
8170 } else {
8271 done ( ) ;
8372 }
84-
85- // const connection = mysqlTypes.createConnection({
86- // port,
87- // user: 'root',
88- // host,
89- // password: rootPassword,
90- // database,
91- // });
92- // try {
93- // await execPromise(connection, `SET GLOBAL log_output='TABLE'`);
94- // await execPromise(connection, `SET GLOBAL general_log = 1`);
95- // } catch (execErr) {
96- // console.error('MySQL seup error: ', execErr);
97- // this.skip();
98- // } finally {
99- // connection.end();
100- // }
10173 } ) ;
10274
10375 beforeEach ( ( ) => {
0 commit comments