diff --git a/test/copy-from.js b/test/copy-from.js index c7e0639..cace38a 100644 --- a/test/copy-from.js +++ b/test/copy-from.js @@ -73,3 +73,32 @@ var testSingleEnd = function() { } testSingleEnd() + +var testClientReuse = function() { + var fromClient = client() + fromClient.query('CREATE TEMP TABLE numbers(num int)') + var txt = 'COPY numbers FROM STDIN'; + var count = 0; + var countMax = 2; + var card = 100000; + var runStream = function() { + var stream = fromClient.query(copy(txt)) + stream.on('end', function() { + count++; + if (count