Skip to content

Commit 0e66a42

Browse files
author
jianggang
committed
feat: add sync_once function
1 parent 1a241c5 commit 0e66a42

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/feature_probe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ mod tests {
446446

447447
#[cfg(test)]
448448
mod server_sdk_contract_tests {
449-
use crate::{FPDetail, FPError, FPUser, FeatureProbe, Repository, SyncType};
449+
use crate::{FPDetail, FPError, FPUser, FeatureProbe, Repository};
450450
use serde::{Deserialize, Serialize};
451451
use serde_json::Value;
452452
use std::fmt::Debug;
@@ -521,7 +521,7 @@ mod server_sdk_contract_tests {
521521
println!("scenario: {}", scenario.scenario);
522522
assert!(!scenario.cases.is_empty());
523523
let fp = FeatureProbe::new_with("secret key".to_string(), scenario.fixture);
524-
fp.sync_now(SyncType::Polling);
524+
525525
for case in scenario.cases {
526526
println!(" case: {}", case.name);
527527

tests/integration_test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ async fn integration_test() {
3535
};
3636

3737
let mut fp = FeatureProbe::new(config);
38-
38+
#[cfg(all(feature = "use_tokio", feature = "realtime"))]
39+
fp.sync_now(SyncType::Polling);
3940
let did_update = {
4041
let did_update = Arc::new(Mutex::new((false, false)));
4142
let did_update_clone = did_update.clone();

0 commit comments

Comments
 (0)