test against server versions down to 4.6

This commit is contained in:
Robin Appelman 2022-01-25 14:31:20 +01:00
commit 5f707cba13
2 changed files with 7 additions and 4 deletions

View file

@ -93,6 +93,8 @@ jobs:
- "latest" - "latest"
- "4.9.4" - "4.9.4"
- "4.8.5" - "4.8.5"
- "4.7.6"
- "4.6.8"
services: services:
samba: samba:
@ -218,14 +220,13 @@ jobs:
steps: steps:
- name: krb5-dev - name: krb5-dev
run: sudo apt-get install -y libkrb5-dev run: sudo apt-get install -y libkrb5-dev smbclient
- name: Checkout - name: Checkout
uses: actions/checkout@master uses: actions/checkout@master
- name: Set up php - name: Set up php
uses: shivammathur/setup-php@master uses: shivammathur/setup-php@v2
with: with:
php-version: "${{ matrix.php-version }}" php-version: "${{ matrix.php-version }}"
tools: composer:v1
coverage: none coverage: none
extensions: apcu, smbclient, krb5 extensions: apcu, smbclient, krb5
env: env:

View file

@ -72,7 +72,9 @@ class NotifyHandlerTest extends TestCase {
usleep(1000 * 100);// give it some time to start listening usleep(1000 * 100);// give it some time to start listening
$share->put(__FILE__, 'source.txt'); $share->put(__FILE__, 'source.txt');
usleep(1000 * 10);
$share->rename('source.txt', 'target.txt'); $share->rename('source.txt', 'target.txt');
usleep(1000 * 10);
$share->del('target.txt'); $share->del('target.txt');
usleep(1000 * 100);// give it some time usleep(1000 * 100);// give it some time
@ -89,7 +91,7 @@ class NotifyHandlerTest extends TestCase {
$process->stop(); $process->stop();
$changes = $this->filterModifiedChanges($changes); $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) { if ($changes[1]->getCode() === INotifyHandler::NOTIFY_REMOVED) {
// sometimes during testing, the move isn't properly recognized with older smb versions, retry a few times // sometimes during testing, the move isn't properly recognized with older smb versions, retry a few times
usleep(1000 * 100); usleep(1000 * 100);