Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Commit e379468

Browse files
authored
Merge pull request #2209 from holochain/scenario-await-sleep
Replace s.consistency with sleep fn in scaffold
2 parents 72b35f1 + 44bb066 commit e379468

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG-UNRELEASED.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1212

1313
### Removed
1414

15+
* Replaced `await s.consistency()` with generic JS sleep function in scenario test scaffold template [#2209](https://github.com/holochain/holochain-rust/pull/2209)
16+
1517
### Fixed
1618

1719
### Security

crates/cli/src/cli/js-tests-scaffold/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ orchestrator.registerScenario("description of example test", async (s, t) => {
4242
// indicating the function, and passing it an input
4343
const addr = await alice.call("myInstanceName", "my_zome", "create_my_entry", {"entry" : {"content":"sample content"}})
4444

45-
// Wait for all network activity to settle
46-
await s.consistency()
45+
// Wait 1s for all network activity to settle; you may need to adjust this
46+
// number to suit your scenario.
47+
await new Promise(r => setTimeout(r, 1000));
4748

4849
const result = await bob.call("myInstanceName", "my_zome", "get_my_entry", {"address": addr.Ok})
4950

0 commit comments

Comments
 (0)