Skip to content

Commit

Permalink
Add feature for ephemeral server usage in test utils (#645)
Browse files Browse the repository at this point in the history
Co-authored-by: Spencer Judge <[email protected]>
  • Loading branch information
h7kanna and Sushisource authored Nov 28, 2023
1 parent 5e2f8bd commit 2f56b81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ edition = "2021"
name = "histfetch"
path = "src/histfetch.rs"

[features]
default = ["ephemeral-server"]
ephemeral-server = ["temporal-sdk-core/ephemeral-server"]

[dependencies]
anyhow = "1.0"
async-trait = "0.1"
Expand All @@ -24,7 +28,7 @@ rmp-serde = "1.1"
serde_json = "1.0"
temporal-client = { path = "../client" }
temporal-sdk = { path = "../sdk" }
temporal-sdk-core = { path = "../core", features = ["ephemeral-server"] }
temporal-sdk-core = { path = "../core" }
temporal-sdk-core-api = { path = "../core-api" }
thiserror = "1.0"
tokio = "1.1"
Expand Down
4 changes: 3 additions & 1 deletion test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ use temporal_sdk::{
interceptors::{FailOnNondeterminismInterceptor, WorkerInterceptor},
IntoActivityFunc, Worker, WorkflowFunction,
};
#[cfg(feature = "ephemeral-server")]
use temporal_sdk_core::ephemeral_server::{EphemeralExe, EphemeralExeVersion};
use temporal_sdk_core::{
ephemeral_server::{EphemeralExe, EphemeralExeVersion},
init_replay_worker, init_worker,
replay::ReplayWorkerInput,
telemetry::{build_otlp_metric_exporter, start_prometheus_metric_exporter},
Expand Down Expand Up @@ -675,6 +676,7 @@ pub fn get_integ_telem_options() -> TelemetryOptions {
.unwrap()
}

#[cfg(feature = "ephemeral-server")]
pub fn default_cached_download() -> EphemeralExe {
EphemeralExe::CachedDownload {
version: EphemeralExeVersion::SDKDefault {
Expand Down

0 comments on commit 2f56b81

Please sign in to comment.