Skip to content

Commit bbc775c

Browse files
committed
Format
1 parent 713675f commit bbc775c

6 files changed

Lines changed: 19 additions & 14 deletions

File tree

crates/sdk-core/src/core_tests/workflow_cancels.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ use rstest::rstest;
1010
use std::time::Duration;
1111
use temporalio_common::protos::coresdk::{
1212
workflow_activation::{WorkflowActivationJob, workflow_activation_job},
13-
workflow_commands::{CancelWorkflowExecution, CompleteWorkflowExecution, FailWorkflowExecution},
13+
workflow_commands::{
14+
CancelWorkflowExecution, CompleteWorkflowExecution, FailWorkflowExecution,
15+
},
1416
};
1517

1618
enum CompletionType {

crates/sdk-core/src/replay/canned_histories.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
use crate::replay::TestHistoryBuilder;
2+
use prost::Message;
3+
use rand::Rng;
4+
use std::{fs::File, io::Write, path::PathBuf};
25
use temporalio_common::protos::{
36
coresdk::common::NamespacedWorkflowExecution,
47
temporal::api::{
@@ -8,9 +11,6 @@ use temporalio_common::protos::{
811
history::v1::*,
912
},
1013
};
11-
use prost::Message;
12-
use rand::Rng;
13-
use std::{fs::File, io::Write, path::PathBuf};
1414

1515
/// 1: EVENT_TYPE_WORKFLOW_EXECUTION_STARTED
1616
/// 2: EVENT_TYPE_WORKFLOW_TASK_SCHEDULED

crates/sdk-core/src/replay/history_builder.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
use crate::replay::HistoryInfo;
2+
use anyhow::bail;
3+
use prost_types::Timestamp;
4+
use std::{
5+
collections::HashMap,
6+
time::{Duration, SystemTime},
7+
};
28
use temporalio_common::protos::{
39
constants::{LOCAL_ACTIVITY_MARKER_NAME, PATCH_MARKER_NAME},
410
coresdk::{
@@ -22,12 +28,6 @@ use temporalio_common::protos::{
2228
update::v1::outcome,
2329
},
2430
};
25-
use anyhow::bail;
26-
use prost_types::Timestamp;
27-
use std::{
28-
collections::HashMap,
29-
time::{Duration, SystemTime},
30-
};
3131
use uuid::Uuid;
3232

3333
/// The workflow type name used by default in test histories.

crates/sdk-core/src/replay/history_info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
use anyhow::{anyhow, bail};
2+
use rand::random;
13
use temporalio_common::protos::temporal::api::{
24
common::v1::WorkflowType,
35
enums::v1::{EventType, TaskQueueKind},
46
history::v1::{History, HistoryEvent, WorkflowExecutionStartedEventAttributes, history_event},
57
taskqueue::v1::TaskQueue,
68
workflowservice::v1::{GetWorkflowExecutionHistoryResponse, PollWorkflowTaskQueueResponse},
79
};
8-
use anyhow::{anyhow, bail};
9-
use rand::random;
1010

1111
/// Contains information about a validated history. Used for replay and other testing.
1212
#[derive(Clone, Debug, PartialEq)]

crates/sdk-core/tests/integ_tests/workflow_tests.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ use temporalio_sdk::{
7070
use temporalio_sdk_core::{
7171
CoreRuntime, PollError, PollerBehavior, TunerHolder, WorkflowErrorType, prost_dur,
7272
replay::{DEFAULT_WORKFLOW_TYPE, HistoryForReplay, canned_histories},
73-
test_help::{MockPollCfg, WorkerTestHelpers, drain_pollers_and_shutdown, schedule_activity_cmd},
73+
test_help::{
74+
MockPollCfg, WorkerTestHelpers, drain_pollers_and_shutdown, schedule_activity_cmd,
75+
},
7476
};
7577
use tokio::{join, sync::Notify, time::sleep};
7678
use tonic::IntoRequest;

crates/sdk-core/tests/integ_tests/workflow_tests/replay.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ use temporalio_sdk::{
2424
use temporalio_sdk_core::{
2525
PollError, prost_dur,
2626
replay::{
27-
DEFAULT_WORKFLOW_TYPE, HistoryFeeder, HistoryForReplay, TestHistoryBuilder, canned_histories,
27+
DEFAULT_WORKFLOW_TYPE, HistoryFeeder, HistoryForReplay, TestHistoryBuilder,
28+
canned_histories,
2829
},
2930
test_help::{MockPollCfg, ResponseType, WorkerTestHelpers},
3031
};

0 commit comments

Comments
 (0)