File tree 3 files changed +71
-0
lines changed
3 files changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ var assert = require ( 'assert' ) ;
2
+ var common = require ( '../../common' ) ;
3
+ var pool = common . createPool ( { port : common . fakeServerPort } ) ;
4
+
5
+ var server = common . createFakeServer ( ) ;
6
+
7
+ process . on ( 'uncaughtException' , function ( err ) {
8
+ if ( err . code !== 'ER_PARSE_ERROR' ) throw err ;
9
+ } ) ;
10
+
11
+ server . listen ( common . fakeServerPort , function ( err ) {
12
+ assert . ifError ( err ) ;
13
+
14
+ pool . getConnection ( function ( err , conn ) {
15
+ assert . ifError ( err ) ;
16
+
17
+ var query = conn . query ( 'SELECT INVALID' ) ;
18
+
19
+ query . on ( 'end' , function ( ) {
20
+ conn . release ( ) ;
21
+ pool . end ( function ( err ) {
22
+ assert . ifError ( err ) ;
23
+ server . destroy ( ) ;
24
+ } ) ;
25
+ } ) ;
26
+ } ) ;
27
+ } ) ;
Original file line number Diff line number Diff line change
1
+ var assert = require ( 'assert' ) ;
2
+ var common = require ( '../../common' ) ;
3
+ var pool = common . createPool ( { port : common . fakeServerPort } ) ;
4
+
5
+ var server = common . createFakeServer ( ) ;
6
+
7
+ process . on ( 'uncaughtException' , function ( err ) {
8
+ if ( err . code !== 'ER_PARSE_ERROR' ) throw err ;
9
+ } ) ;
10
+
11
+ server . listen ( common . fakeServerPort , function ( err ) {
12
+ assert . ifError ( err ) ;
13
+
14
+ var query = pool . query ( 'SELECT INVALID' ) ;
15
+
16
+ query . on ( 'end' , function ( ) {
17
+ pool . end ( function ( err ) {
18
+ assert . ifError ( err ) ;
19
+ server . destroy ( ) ;
20
+ } ) ;
21
+ } ) ;
22
+ } ) ;
Original file line number Diff line number Diff line change
1
+ var assert = require ( 'assert' ) ;
2
+ var common = require ( '../../common' ) ;
3
+ var connection = common . createConnection ( { port : common . fakeServerPort } ) ;
4
+
5
+ var server = common . createFakeServer ( ) ;
6
+
7
+ process . on ( 'uncaughtException' , function ( err ) {
8
+ if ( err . code !== 'ER_PARSE_ERROR' ) throw err ;
9
+ } ) ;
10
+
11
+ server . listen ( common . fakeServerPort , function ( err ) {
12
+ assert . ifError ( err ) ;
13
+
14
+ var query = connection . query ( 'SELECT INVALID' ) ;
15
+
16
+ query . on ( 'end' , function ( ) {
17
+ connection . end ( function ( err ) {
18
+ assert . ifError ( err ) ;
19
+ server . destroy ( ) ;
20
+ } ) ;
21
+ } ) ;
22
+ } ) ;
You can’t perform that action at this time.
0 commit comments