Skip to content

Commit

Permalink
Fix test imports
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz N. Gies <[email protected]>
  • Loading branch information
Licenser committed Oct 26, 2023
1 parent 5d2e0ae commit 82b7cde
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/connectors/tests/elastic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use tokio::process;
use tremor_common::ports::IN;
use tremor_pipeline::{CbAction, Event, EventId};
use tremor_value::{literal, value::StaticValue};
use value_trait::{Mutable, Value, ValueAccess};
use value_trait::prelude::*;

const IMAGE: &str = "elasticsearch";
const VERSION: &str = "8.6.2";
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/tests/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use super::ConnectorHarness;
use crate::{connectors::impls::file, errors::Result};
use std::path::Path;
use tremor_value::literal;
use value_trait::ValueAccess;
use value_trait::prelude::*;

#[tokio::test(flavor = "multi_thread")]
async fn file_connector() -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/tests/file_xz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use super::ConnectorHarness;
use crate::{connectors::impls::file, errors::Result};
use std::path::Path;
use tremor_value::literal;
use value_trait::ValueAccess;
use value_trait::prelude::*;

#[tokio::test(flavor = "multi_thread")]
async fn file_connector_xz() -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/tests/gpubsub/gsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use testcontainers::RunnableImage;
use tonic::transport::Channel;
use tremor_pipeline::CbAction;
use tremor_value::{literal, Value};
use value_trait::ValueAccess;
use value_trait::prelude::*;

#[tokio::test(flavor = "multi_thread")]
#[serial(gpubsub)]
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/tests/http/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use tremor_common::url::HttpDefaults;
use tremor_pipeline::Event;
use tremor_script::ValueAndMeta;
use tremor_value::{literal, Value};
use value_trait::{Mutable, ValueAccess};
use value_trait::prelude::*;

/// Find free TCP host:port for use in test server endpoints
pub(crate) async fn find_free_tcp_endpoint_str() -> Result<String> {
Expand Down
3 changes: 1 addition & 2 deletions src/connectors/tests/http/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use http::StatusCode;
use http_body::Body as BodyTrait;
use hyper::{body::to_bytes, Body, Request, Response};
use hyper_rustls::HttpsConnectorBuilder;
use simd_json::Mutable;
use std::{
path::PathBuf,
time::{Duration, Instant},
Expand All @@ -34,7 +33,7 @@ use tremor_common::ports::IN;
use tremor_pipeline::{Event, EventId};
use tremor_script::ValueAndMeta;
use tremor_value::{literal, Value};
use value_trait::ValueAccess;
use value_trait::prelude::*;

/// This function takes a harness and connects it the following way:
///
Expand Down
14 changes: 7 additions & 7 deletions src/connectors/tests/kafka/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use testcontainers::clients::Cli as DockerCli;
use tokio::time::timeout;
use tremor_pipeline::CbAction;
use tremor_value::{literal, Value};
use value_trait::Builder;
use value_trait::prelude::*;

#[tokio::test(flavor = "multi_thread")]
#[serial(kafka)]
Expand Down Expand Up @@ -225,7 +225,7 @@ async fn transactional_retry() -> Result<()> {
let e5 = harness.err()?.get_event().await?;
assert_eq!(
&literal!({
"error": "SIMD JSON error: InternalError at character 0 ('}')",
"error": "SIMD JSON error: InternalError(TapeError) at character 0 ('}')",
"source": "test::transactional_retry",
"stream_id": 8_589_934_592_u64,
"pull_id": 1u64
Expand All @@ -234,7 +234,7 @@ async fn transactional_retry() -> Result<()> {
);
assert_eq!(
&literal!({
"error": "SIMD JSON error: InternalError at character 0 ('}')",
"error": "SIMD JSON error: InternalError(TapeError) at character 0 ('}')",
"kafka_consumer": {
"key": Value::Bytes(Cow::owned("failure".as_bytes().to_vec())),
"headers": null,
Expand Down Expand Up @@ -442,7 +442,7 @@ async fn custom_no_retry() -> Result<()> {
let e5 = harness.err()?.get_event().await?;
assert_eq!(
&literal!({
"error": "SIMD JSON error: InternalError at character 0 ('}')",
"error": "SIMD JSON error: InternalError(TapeError) at character 0 ('}')",
"source": "test::custom_no_retry",
"stream_id": 8_589_934_592_u64,
"pull_id": 1u64
Expand All @@ -451,7 +451,7 @@ async fn custom_no_retry() -> Result<()> {
);
assert_eq!(
&literal!({
"error": "SIMD JSON error: InternalError at character 0 ('}')",
"error": "SIMD JSON error: InternalError(TapeError) at character 0 ('}')",
"kafka_consumer": {
"key": Value::Bytes(Cow::owned("failure".as_bytes().to_vec())),
"headers": null,
Expand Down Expand Up @@ -648,7 +648,7 @@ async fn performance() -> Result<()> {
let e5 = harness.err()?.get_event().await?;
assert_eq!(
&literal!({
"error": "SIMD JSON error: InternalError at character 0 ('}')",
"error": "SIMD JSON error: InternalError(TapeError) at character 0 ('}')",
"source": "test::performance",
"stream_id": 8_589_934_592_u64,
"pull_id": 1u64
Expand All @@ -657,7 +657,7 @@ async fn performance() -> Result<()> {
);
assert_eq!(
&literal!({
"error": "SIMD JSON error: InternalError at character 0 ('}')",
"error": "SIMD JSON error: InternalError(TapeError) at character 0 ('}')",
"kafka_consumer": {
"key": Value::Bytes(Cow::owned("failure".as_bytes().to_vec())),
"headers": null,
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/tests/s3/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use aws_sdk_s3::{primitives::ByteStream, Client};
use serial_test::serial;
use testcontainers::clients;
use tremor_value::{literal, Value};
use value_trait::ValueAccess;
use value_trait::prelude::*;

#[tokio::test(flavor = "multi_thread")]
#[serial(s3)]
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/tests/s3/streamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use tokio::time::timeout;
use tremor_common::ports::IN;
use tremor_pipeline::{CbAction, Event, EventId};
use tremor_value::{literal, value};
use value_trait::{Builder, Mutable, ValueAccess};
use value_trait::prelude::*;

#[tokio::test(flavor = "multi_thread")]
#[serial(s3)]
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/tests/tcp/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use tokio::net::lookup_host;
use tremor_common::ports::IN;
use tremor_pipeline::{CbAction, Event, EventId};
use tremor_value::{literal, Value};
use value_trait::{Builder, ValueAccess};
use value_trait::prelude::*;

#[tokio::test(flavor = "multi_thread")]
async fn tls_client() -> Result<()> {
Expand Down
1 change: 0 additions & 1 deletion src/connectors/tests/tcp/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use tokio::{
use tremor_common::ports::IN;
use tremor_pipeline::{Event, EventId};
use tremor_value::{literal, prelude::*, Value};
use value_trait::Builder;

#[tokio::test(flavor = "multi_thread")]
async fn server_event_routing() -> Result<()> {
Expand Down
1 change: 0 additions & 1 deletion src/connectors/tests/unix_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use tokio::{
use tremor_common::ports::IN;
use tremor_pipeline::{Event, EventId};
use tremor_value::{literal, prelude::*, Value};
use value_trait::Builder;

#[tokio::test(flavor = "multi_thread")]
async fn unix_socket() -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/preprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(crate) mod prelude {
pub use super::Preprocessor;
pub use crate::errors::Result;
pub use tremor_value::Value;
pub use value_trait::Builder;
use value_trait::prelude::*;
}
use self::prelude::*;
use crate::{alias::Connector, config::Preprocessor as PreprocessorConfig, errors::Result};
Expand Down
2 changes: 1 addition & 1 deletion tremor-influx/src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use crate::{DecoderError as Error, DecoderResult as Result};
use std::{borrow::Cow, hash::Hash};
use value_trait::prelude::{MutableObject, *};
use value_trait::prelude::*;

macro_rules! cant_error {
($e:expr) => {
Expand Down
1 change: 0 additions & 1 deletion tremor-value/src/known_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ mod tests {

use super::*;
use beef::Cow;
use value_trait::ValueBuilder;

#[test]
fn known_key() {
Expand Down

0 comments on commit 82b7cde

Please sign in to comment.