@@ -157,6 +157,17 @@ describe('Sender connection suite', function () {
157
157
await sender . close ( ) ;
158
158
await proxy . stop ( ) ;
159
159
} ) ;
160
+
161
+ it ( 'can handle unfinished rows during flush()' , async function ( ) {
162
+ const proxy = await createProxy ( true , proxyOptions ) ;
163
+ const sender = await createSender ( JWK , true ) ;
164
+ sender . table ( "test" ) . symbol ( "location" , "us" ) ;
165
+ const sent = await sender . flush ( ) ;
166
+ expect ( sent ) . toBe ( false ) ;
167
+ await sender . close ( ) ;
168
+ await assertSentData ( proxy , true , "testapp\n" ) ;
169
+ await proxy . stop ( ) ;
170
+ } ) ;
160
171
} ) ;
161
172
162
173
describe ( 'Client interop test suite' , function ( ) {
@@ -367,6 +378,14 @@ describe('Sender message builder test suite (anything not covered in client inte
367
378
) . toThrow ( "Value must be an integer, received 123.222" ) ;
368
379
} ) ;
369
380
381
+ it ( 'throws exception if a float is passed as timestamp field' , function ( ) {
382
+ const sender = new Sender ( { bufferSize : 1024 } ) ;
383
+ expect (
384
+ ( ) => sender . table ( "tableName" )
385
+ . timestampColumn ( "intField" , 123.222 )
386
+ ) . toThrow ( "Value must be an integer, received 123.222" ) ;
387
+ } ) ;
388
+
370
389
it ( 'throws exception if designated timestamp is not a string' , function ( ) {
371
390
const sender = new Sender ( { bufferSize : 1024 } ) ;
372
391
expect (
0 commit comments