Skip to content

Commit 613f034

Browse files
committed
resolved test
1 parent 4de3754 commit 613f034

6 files changed

Lines changed: 18 additions & 18 deletions

File tree

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ name = "encrypted_upload_test"
7777
path = "examples/encrypted_upload_test.rs"
7878

7979
[workspace.package]
80-
version = "0.3.4"
80+
version = "0.3.5"
8181
edition = "2021"
8282
license = "MIT OR Apache-2.0"
8383
repository = "https://github.com/functionland/fula-api"

crates/fula-client/src/encryption.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7559,19 +7559,18 @@ mod tests {
75597559
#[cfg(not(target_arch = "wasm32"))]
75607560
mod f9_manifest_version_pin_mac {
75617561
use super::*;
7562-
use std::sync::Mutex;
75637562

75647563
// Tests mutate FULA_STATE_DIR; serialize across cargo's parallel
75657564
// runner so concurrent tests cannot read each other's env var.
7566-
static ENV_LOCK: Mutex<()> = Mutex::new(());
7567-
7565+
// Uses the crate-wide TEST_ENV_LOCK shared with wal.rs and
7566+
// orphan_queue.rs so those modules' tests can't race each other.
75687567
struct StateDirGuard {
75697568
_dir: tempfile::TempDir,
75707569
_lock: std::sync::MutexGuard<'static, ()>,
75717570
}
75727571

75737572
fn tmp_state_dir() -> StateDirGuard {
7574-
let lock = ENV_LOCK.lock().unwrap_or_else(|p| p.into_inner());
7573+
let lock = crate::TEST_ENV_LOCK.lock().unwrap_or_else(|p| p.into_inner());
75757574
let dir = tempfile::tempdir().expect("tempdir");
75767575
std::env::set_var("FULA_STATE_DIR", dir.path());
75777576
StateDirGuard { _dir: dir, _lock: lock }

crates/fula-client/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ mod orphan_queue;
4848
#[cfg(not(target_arch = "wasm32"))]
4949
mod wal;
5050

51-
// Cross-module test serializer. Unit tests in wal.rs and orphan_queue.rs both
52-
// mutate `FULA_STATE_DIR`; without a single shared lock, tests in each module
53-
// can set the env var concurrently and read each other's temp dir.
51+
// Cross-module test serializer. Unit tests in wal.rs, orphan_queue.rs, and the
52+
// f9_manifest_version_pin_mac module in encryption.rs all mutate
53+
// `FULA_STATE_DIR`; without a single shared lock, tests in each module can set
54+
// the env var concurrently and read each other's temp dir.
5455
#[cfg(test)]
5556
#[cfg(not(target_arch = "wasm32"))]
5657
pub(crate) static TEST_ENV_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(());

packages/fula_client/ios/fula_client.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Pod::Spec.new do |s|
88
s.name = 'fula_client'
9-
s.version = '0.3.4'
9+
s.version = '0.3.5'
1010
s.summary = 'Flutter SDK for Fula decentralized storage'
1111
s.description = <<-DESC
1212
A Flutter plugin providing client-side encryption, metadata privacy,

packages/fula_client/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: fula_client
22
description: Flutter SDK for Fula decentralized storage with client-side encryption, metadata privacy, and secure sharing.
3-
version: 0.3.4
3+
version: 0.3.5
44
homepage: https://fx.land
55
repository: https://github.com/functionland/fula-api
66
issue_tracker: https://github.com/functionland/fula-api/issues

0 commit comments

Comments
 (0)