File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ TarantoolConnection.prototype.onData = function(data){
8080 }
8181 break ;
8282 case states . AWAITING :
83- var trackResult = this . _responseBufferTrack ( Buffer . concat ( this . buffer , data ) , this . awaitingResponseLength ) ;
83+ var trackResult = this . _responseBufferTrack ( Buffer . concat ( [ this . buffer , data ] ) , this . awaitingResponseLength ) ;
8484 if ( trackResult . length == 2 )
8585 {
8686 this . state = states . AWAITING ;
Original file line number Diff line number Diff line change @@ -93,5 +93,18 @@ describe('Tarantool Connection tests', function(){
9393 done ( ) ;
9494 } ) . catch ( function ( e ) { done ( e ) } ) ;
9595 } ) ;
96+ it ( 'a lot of insert' , function ( done ) {
97+ var promises = [ ] ;
98+ for ( var i = 0 ; i <= 1000 ; i ++ ) {
99+ conn . insert ( 512 , [ 'key' + i , i ] ) ; // ok
100+ }
101+ Promise . all ( promises )
102+ . then ( function ( pr ) {
103+ done ( ) ;
104+ } )
105+ . catch ( function ( e ) {
106+ done ( e ) ;
107+ } ) ;
108+ } )
96109 } ) ;
97110} ) ;
You can’t perform that action at this time.
0 commit comments