File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 18
18
matrix :
19
19
os : [ubuntu-latest, windows-latest]
20
20
php : [8.3, 8.2]
21
- stability : [prefer-lowest, prefer-stable]
22
21
23
- name : P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix. os }}
22
+ name : P${{ matrix.php }} - ${{ matrix.os }}
24
23
25
24
steps :
26
25
- name : Checkout code
41
40
- name : Install dependencies
42
41
run : |
43
42
composer i --no-interaction
44
- composer update --${{ matrix.stability }} -- prefer-dist --no-interaction
43
+ composer update --prefer-dist --no-interaction
45
44
46
45
- name : List Installed Dependencies
47
46
run : composer show -D
Original file line number Diff line number Diff line change @@ -113,5 +113,21 @@ public function throwIfFailedOnTerm(): void
113
113
throw new ProcessFailedException ($ this ->serviceProcess );
114
114
}
115
115
116
+ // ? interface
117
+ public function waitForTermination (int $ timeout ): void
118
+ {
119
+ $ elapsed = 0 ;
120
+ $ sleepInterval = 100 ; // Sleep for 100 milliseconds
121
+
122
+ while ($ this ->serviceProcess ->isRunning () && $ elapsed < $ timeout ) {
123
+ usleep ($ sleepInterval * 1000 );
124
+ $ elapsed += $ sleepInterval ;
125
+ }
126
+
127
+ if ($ this ->serviceProcess ->isRunning ()) {
128
+ throw new XsslessException ('Process did not terminate within the given timeout ' );
129
+ }
130
+ }
131
+
116
132
// ========================================================================
117
133
}
Original file line number Diff line number Diff line change 70
70
));
71
71
72
72
expect (fn () => $ service ->start ())->toThrow (ProcessFailedException::class);
73
- expect ($ service ->serviceProcess ->getTermSignal ())->toBe (127 );
74
- // TODO: fix https://github.com/medilies/xssless/actions/runs/10283025153/job/28455979969
75
- // TODO: wait for signal
73
+ $ service ->waitForTermination (20000 );
74
+ expect ($ service ->serviceProcess ->getExitCode ())->toBe (127 );
76
75
});
You can’t perform that action at this time.
0 commit comments