File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -58,24 +58,23 @@ if (!defined($pid = fork())) {
5858 ok(sendNotifications(), " Sent notifications" );
5959
6060 kill (' INT' , $pid );
61+ waitpid ($pid , 0);
6162}
6263
6364# We expect $ctx{jobsdir}/server.py to create the file at $filename, but the time it
6465# takes to do so is non-deterministic. We need to give it _some_ time to hopefully
6566# settle -- but not too much that it drastically slows things down.
6667for my $i (1..10) {
67- if (! -f $filename ) {
68- diag(" $filename does not yet exist" );
69- sleep (1);
70- }
68+ last if -f $filename ;
69+ diag(" $filename does not yet exist" );
70+ sleep (1);
7171}
7272
7373open (my $fh , " <" , $filename ) or die (" Can't open(): $! \n " );
74- my $i = 0;
75- my $uri = <$fh >;
74+ my $request_uri = <$fh >;
7675my $data = <$fh >;
7776
78- ok(index ($uri , " gitea/api/v1/repos/root/foo/statuses" ) != -1, " Correct URL" );
77+ ok(index ($request_uri , " gitea/api/v1/repos/root/foo/statuses" ) != -1, " Correct URL" );
7978
8079my $json = JSON-> new;
8180my $content ;
You can’t perform that action at this time.
0 commit comments