Skip to content

Commit dfe03a7

Browse files
committed
Fix Journey 3: delay other-user rename so star refusal is tested
The other-user rename ran synchronously before the client's star request (which waits a hop()) reached the server, so refuseStar never saw the original title 'Harbor'. Adding await hop() before the rename ensures the star request arrives first and is correctly refused.
1 parent 73ce30c commit dfe03a7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎benchmarks/data-store-comparison/src/journeys.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* whether any notification showed an impossible state on the way.
66
*/
77
import type { Design, DesignFactory } from './design.ts';
8-
import { LibraryServer, VIEWS, evaluate, visible, type Book } from './library.ts';
8+
import { LibraryServer, VIEWS, evaluate, hop, visible, type Book } from './library.ts';
99

1010
export interface Result {
1111
readonly journey: string;
@@ -88,6 +88,7 @@ export const JOURNEYS: readonly Journey[] = [
8888
intended: (server) => edit(server, 'b2', { starred: true, title: 'Night harbor' }),
8989
async act({ design, server }) {
9090
const starred = design.update('b2', { starred: true }).catch(() => 'refused');
91+
await hop();
9192
server.update('b2', { title: 'Night harbor' }, 'other');
9293
return starred;
9394
},

0 commit comments

Comments
 (0)