pub enum TestingOutput {
ToFile(PathBuf),
ToWriter(Box<dyn Write + Send>),
ToChannel(Sender<Map<String, Value>>),
}Expand description
Specifies where to write the output data of an integration test.
§Output File Format
The output file is a JSONL (“JSON lines”) file. Each line in the file is a separate JSON object that represents one output sent by the node.
The following fields are present in each output object:
id(string): The output identifier that was used when sending the output.data: The output data (if any), encoded as JSON.- see below for details on the encoding
data_type(string or object): The arrow::datatypes::DataType of the output data- Serialized to JSON using the type’s
serde::Serializeimplementation.
- Serialized to JSON using the type’s
time_offset_secs(float, optional): The time offset in seconds between the start of the node and the time when the output was sent.- This field is omitted if the
DORA_TEST_NO_OUTPUT_TIME_OFFSETenvironment is set.
- This field is omitted if the
§Output Data Encoding
We use the following steps to encode the data field of each output object:
- Convert the data to a
RecordBatchthrough:ⓘRecordBatch::try_from_iter([("inner", data)]) - Convert the
RecordBatchto a JSON object through thearrow_json::ArrayWriter.
Variants§
ToFile(PathBuf)
Writes the output to the given JSONL file.
The file will be created or overwritten.
ToWriter(Box<dyn Write + Send>)
Writes the output as JSONL file to the given writer.
ToChannel(Sender<Map<String, Value>>)
Sends each output as a JSON object to the given flume::Receiver.
Note: When using a bounded channel, the node may block when the channel is full.
Auto Trait Implementations§
impl Freeze for TestingOutput
impl !RefUnwindSafe for TestingOutput
impl Send for TestingOutput
impl !Sync for TestingOutput
impl Unpin for TestingOutput
impl !UnwindSafe for TestingOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request