@@ -41,29 +41,29 @@ void main() {
4141 }
4242 });
4343 test ('can be stopped' , () async {
44- final workspace = generateV4UUID ();
44+ final workspace = randomWorkspace ();
4545 testWorkspaces.add (workspace);
4646 final daemon = Daemon (workspace);
4747 await daemon.start (< String > {}, FakeDaemonBuilder (), FakeChangeProvider ());
4848 expect (daemon.onDone, completes);
4949 await daemon.stop ();
5050 });
5151 test ('can run if no other daemon is running' , () async {
52- final workspace = generateV4UUID ();
52+ final workspace = randomWorkspace ();
5353 final daemon = await _runDaemon (workspace);
5454 testDaemons.add (daemon);
5555 expect (await _statusOf (daemon), 'RUNNING' );
5656 });
5757 test ('shuts down if no client connects' , () async {
58- final workspace = generateV4UUID ();
58+ final workspace = randomWorkspace ();
5959 final daemon = await _runDaemon (workspace, timeout: 1 );
6060 testDaemons.add (daemon);
6161 expect (await daemon.exitCode, isNotNull);
6262 });
6363 test (
6464 'can not run if another daemon is running in the same workspace' ,
6565 () async {
66- final workspace = generateV4UUID ();
66+ final workspace = randomWorkspace ();
6767 testWorkspaces.add (workspace);
6868 final daemonOne = await _runDaemon (
6969 workspace,
@@ -79,8 +79,8 @@ void main() {
7979 test (
8080 'can run if another daemon is running in a different workspace' ,
8181 () async {
82- final workspace1 = generateV4UUID ();
83- final workspace2 = generateV4UUID ();
82+ final workspace1 = randomWorkspace ();
83+ final workspace2 = randomWorkspace ();
8484 testWorkspaces.addAll ([workspace1, workspace2]);
8585 final daemonOne = await _runDaemon (workspace1);
8686 expect (await _statusOf (daemonOne), 'RUNNING' );
@@ -91,7 +91,7 @@ void main() {
9191 timeout: const Timeout .factor (2 ),
9292 );
9393 test ('can start two daemons at the same time' , () async {
94- final workspace = generateV4UUID ();
94+ final workspace = randomWorkspace ();
9595 testWorkspaces.add (workspace);
9696 final daemonOne = await _runDaemon (workspace);
9797 expect (await _statusOf (daemonOne), 'RUNNING' );
@@ -100,20 +100,20 @@ void main() {
100100 testDaemons.addAll ([daemonOne, daemonTwo]);
101101 }, timeout: const Timeout .factor (2 ));
102102 test ('logs the version when running' , () async {
103- final workspace = generateV4UUID ();
103+ final workspace = randomWorkspace ();
104104 testWorkspaces.add (workspace);
105105 final daemon = await _runDaemon (workspace);
106106 testDaemons.add (daemon);
107107 expect (await _statusOf (daemon), 'RUNNING' );
108108 expect (await Daemon (workspace).runningVersion (), currentVersion);
109109 });
110110 test ('does not set the current version if not running' , () async {
111- final workspace = generateV4UUID ();
111+ final workspace = randomWorkspace ();
112112 testWorkspaces.add (workspace);
113113 expect (await Daemon (workspace).runningVersion (), null );
114114 });
115115 test ('logs the options when running' , () async {
116- final workspace = generateV4UUID ();
116+ final workspace = randomWorkspace ();
117117 testWorkspaces.add (workspace);
118118 final daemon = await _runDaemon (workspace);
119119 testDaemons.add (daemon);
@@ -124,12 +124,12 @@ void main() {
124124 );
125125 });
126126 test ('does not log the options if not running' , () async {
127- final workspace = generateV4UUID ();
127+ final workspace = randomWorkspace ();
128128 testWorkspaces.add (workspace);
129129 expect ((await Daemon (workspace).currentOptions ()).isEmpty, isTrue);
130130 });
131131 test ('cleans up after itself' , () async {
132- final workspace = generateV4UUID ();
132+ final workspace = randomWorkspace ();
133133 testWorkspaces.add (workspace);
134134 final daemon = await _runDaemon (workspace);
135135 // Wait for the daemon to be running before checking the workspace exits.
@@ -141,7 +141,7 @@ void main() {
141141 expect (Directory (daemonWorkspace (workspace)).existsSync (), isFalse);
142142 });
143143 test ('daemon stops after file changes stream has error' , () async {
144- final workspace = generateV4UUID ();
144+ final workspace = randomWorkspace ();
145145 testWorkspaces.add (workspace);
146146 final daemon = await _runDaemon (
147147 workspace,
@@ -152,7 +152,7 @@ void main() {
152152 expect (Directory (daemonWorkspace (workspace)).existsSync (), isFalse);
153153 });
154154 test ('daemon stops after file changes stream is closed' , () async {
155- final workspace = generateV4UUID ();
155+ final workspace = randomWorkspace ();
156156 testWorkspaces.add (workspace);
157157 final daemon = await _runDaemon (
158158 workspace,
0 commit comments