@@ -130,19 +130,23 @@ fn accidental_writes_through_symlinks_are_prevented_if_overwriting_is_forbidden(
130
130
stripped_prefix( & source_tree, & source_files) ,
131
131
stripped_prefix( & destination, & worktree_files) ,
132
132
) ;
133
- assert_eq ! (
134
- outcome. collisions,
135
- vec![
136
- Collision {
137
- path: "FAKE-DIR" . into( ) ,
138
- error_kind: AlreadyExists
139
- } ,
140
- Collision {
141
- path: "FAKE-FILE" . into( ) ,
142
- error_kind: AlreadyExists
143
- }
144
- ]
145
- ) ;
133
+ if multi_threaded ( ) {
134
+ assert_eq ! ( outcome. collisions. len( ) , 2 ) ;
135
+ } else {
136
+ assert_eq ! (
137
+ outcome. collisions,
138
+ vec![
139
+ Collision {
140
+ path: "FAKE-DIR" . into( ) ,
141
+ error_kind: AlreadyExists
142
+ } ,
143
+ Collision {
144
+ path: "FAKE-FILE" . into( ) ,
145
+ error_kind: AlreadyExists
146
+ }
147
+ ]
148
+ ) ;
149
+ }
146
150
} else {
147
151
let expected = [ "A-dir/a" , "A-file" , "FAKE-DIR" , "FAKE-FILE" , "fake-dir/b" , "fake-file" ] ;
148
152
assert_eq ! ( stripped_prefix( & source_tree, & source_files) , paths( expected) ) ;
@@ -309,15 +313,19 @@ fn keep_going_collects_results() {
309
313
) ;
310
314
}
311
315
312
- assert_eq ! (
313
- stripped_prefix( & destination, & dir_structure( & destination) ) ,
314
- paths( if cfg!( unix) {
315
- [ "dir/sub-dir/symlink" , "executable" ]
316
- } else {
317
- [ "empty" , "executable" ]
318
- } ) ,
319
- "some files could not be created"
320
- ) ;
316
+ if multi_threaded ( ) {
317
+ assert_eq ! ( dir_structure( & destination) . len( ) , 2 ) ;
318
+ } else {
319
+ assert_eq ! (
320
+ stripped_prefix( & destination, & dir_structure( & destination) ) ,
321
+ paths( if cfg!( unix) {
322
+ [ "dir/sub-dir/symlink" , "executable" ]
323
+ } else {
324
+ [ "empty" , "executable" ]
325
+ } ) ,
326
+ "some files could not be created"
327
+ ) ;
328
+ }
321
329
322
330
assert ! ( outcome. collisions. is_empty( ) ) ;
323
331
}
0 commit comments