Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set up project to use Paratest #136

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

feat: set up project to use Paratest #136

wants to merge 4 commits into from

Conversation

vitgrams
Copy link
Contributor

Done:

  • Save production doc only after all workers completed their job;
  • Added lock for tmp documentation file (for read & write as well).

@vitgrams
Copy link
Contributor Author

@DenTray Could you please review this one?

@vitgrams vitgrams self-assigned this Sep 30, 2024
@vitgrams vitgrams requested a review from DenTray September 30, 2024 05:18
src/Drivers/BaseDriver.php Outdated Show resolved Hide resolved
src/Drivers/BaseDriver.php Outdated Show resolved Hide resolved
src/Drivers/BaseDriver.php Outdated Show resolved Hide resolved
@vitgrams vitgrams force-pushed the paratests branch 2 times, most recently from 4f5f786 to c64db73 Compare October 25, 2024 10:16
@vitgrams vitgrams force-pushed the paratests branch 9 times, most recently from 1a303da to d4e0f6e Compare November 29, 2024 08:23
@vitgrams
Copy link
Contributor Author

@DenTray Could you please take a look at this again?

src/Drivers/BaseDriver.php Outdated Show resolved Hide resolved
@DenTray DenTray removed their assignment Dec 3, 2024
@vitgrams
Copy link
Contributor Author

vitgrams commented Dec 3, 2024

@DenTray Done. Could you please take a look?

@DenTray DenTray requested a review from aizlee December 6, 2024 09:15
Copy link

sonarqubecloud bot commented Dec 9, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

throw new RuntimeException('Unable to lock file');
}

usleep(rand($minWaitTime, $maxWaitTime));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
usleep(rand($minWaitTime, $maxWaitTime));
usleep($waitTime);


protected function writeFileWithLock(string $filePath, callable $callback): void
{
$handle = fopen($filePath, 'c+');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$handle = fopen($filePath, 'c+');
$fileResource = fopen($filePath, 'c+');


protected function writeFileWithLock(string $filePath, callable $callback): void
{
$handle = fopen($filePath, 'c+');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move c+ value to the user readable constant

Comment on lines +20 to +22
if (ParallelTesting::token()) {
$swaggerService->mergeTempDocumentation();
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move it into the saveProductionData

@DenTray DenTray assigned vitgrams and unassigned DenTray Dec 10, 2024
@DenTray DenTray removed the request for review from aizlee December 10, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants