clockworklabs / clockworklabs/SpacetimeDB

"Access is denied" when running `cargo test` on Windows

Open
#1,618 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

When running cargo test -p spacetimedb-sdk on Windows, I'm getting tons of test failures like

---- rust::reconnect_same_address stdout ----
could not save config file: Access is denied. (os error 5)
Note: Using --project-path to provide a wasm file is deprecated, and will be
removed in a future release. Please use --wasm-file instead.
Uploading to local => http://127.0.0.1:3000
Publishing module...
thread 'rust::reconnect_same_address' panicked at crates\testing\src\lib.rs:38:10:
called `Result::unwrap()` on an `Err` value: Access is denied. (os error 5)

---- rust::delete_address stdout ----
could not save config file: Access is denied. (os error 5)
Note: Using --project-path to provide a wasm file is deprecated, and will be
removed in a future release. Please use --wasm-file instead.
Uploading to local => http://127.0.0.1:3000
Publishing module...
thread 'rust::delete_address' panicked at crates\testing\src\lib.rs:38:10:
called `Result::unwrap()` on an `Err` value: Access is denied. (os error 5)

---- rust::subscribe_all_select_star stdout ----
could not save config file: Access is denied. (os error 5)
Note: Using --project-path to provide a wasm file is deprecated, and will be
removed in a future release. Please use --wasm-file instead.
Uploading to local => http://127.0.0.1:3000
Publishing module...
thread 'rust::subscribe_all_select_star' panicked at crates\testing\src\lib.rs:38:10:
called `Result::unwrap()` on an `Err` value: Access is denied. (os error 5)

This has been happening for a couple of months now - I vaguely remember some changing to file locking - but I kept working around with --test-threads 1 so never raised this issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run cargo test -p spacetimedb-sdk on Windows and inspect crates/testing/src/lib.rs:38, where the test setup unwraps the access-denied result. Compare the failures with the --test-threads 1 workaround and investigate the config-file save or locking behavior; done means the affected tests pass without requiring serialized execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.