From 5f707cba13126c20d5a671bbb638035f62ce1f29 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 25 Jan 2022 14:31:20 +0100 Subject: [PATCH] test against server versions down to 4.6 --- .github/workflows/ci.yaml | 7 ++++--- tests/NotifyHandlerTest.php | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cc23e91..65215d9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -93,6 +93,8 @@ jobs: - "latest" - "4.9.4" - "4.8.5" + - "4.7.6" + - "4.6.8" services: samba: @@ -218,14 +220,13 @@ jobs: steps: - name: krb5-dev - run: sudo apt-get install -y libkrb5-dev + run: sudo apt-get install -y libkrb5-dev smbclient - name: Checkout uses: actions/checkout@master - name: Set up php - uses: shivammathur/setup-php@master + uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" - tools: composer:v1 coverage: none extensions: apcu, smbclient, krb5 env: diff --git a/tests/NotifyHandlerTest.php b/tests/NotifyHandlerTest.php index 954c656..46e194b 100644 --- a/tests/NotifyHandlerTest.php +++ b/tests/NotifyHandlerTest.php @@ -72,7 +72,9 @@ class NotifyHandlerTest extends TestCase { usleep(1000 * 100);// give it some time to start listening $share->put(__FILE__, 'source.txt'); + usleep(1000 * 10); $share->rename('source.txt', 'target.txt'); + usleep(1000 * 10); $share->del('target.txt'); usleep(1000 * 100);// give it some time @@ -89,7 +91,7 @@ class NotifyHandlerTest extends TestCase { $process->stop(); $changes = $this->filterModifiedChanges($changes); - $this->assertCount(4, $changes); + $this->assertCount(4, $changes, "Expected 4 changes got: " . print_r($changes, true)); if ($changes[1]->getCode() === INotifyHandler::NOTIFY_REMOVED) { // sometimes during testing, the move isn't properly recognized with older smb versions, retry a few times usleep(1000 * 100);