mod common;
use sonic_client::SonicMultiplexer;
use sonic_client::ingest::SonicChannelIngestBlocking;
use crate::common::{PASS, start_sonic};
const COLLECTION: &str = "collection";
const BUCKET: &str = "bucket";
#[test]
fn test_buffering() {
let (_guard, addr) = start_sonic();
let multiplexer = SonicMultiplexer::new().unwrap();
let sonic = SonicChannelIngestBlocking::connect(addr, PASS, &multiplexer).unwrap();
let buffer_size = sonic.channel_info().buffer_size;
let str = "foo \"bar\" ";
let text = str.repeat((buffer_size / str.len()) + 4);
sonic.push(COLLECTION, BUCKET, "object", text).unwrap();
}