From bfc11745916d0c3d0c666687ee87d96f4f66780f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Tue, 12 Nov 2024 10:31:19 +0100 Subject: [PATCH] WIP: Debug flakiness --- .drone.star | 14 +++--------- pkg/storage/fs/posix/tree/inotifywatcher.go | 24 ++++++++++----------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.drone.star b/.drone.star index c938848c76..b1c98a07c5 100644 --- a/.drone.star +++ b/.drone.star @@ -109,15 +109,7 @@ def main(ctx): checkGoGenerate(), coverage(), buildOnly(), - testIntegration(), - litmusOcisOldWebdav(), - litmusOcisNewWebdav(), - litmusOcisSpacesDav(), - cs3ApiValidatorOcis(), - cs3ApiValidatorS3NG(), - # virtual views don't work on edge at the moment - #virtualViews(), - ] + ocisIntegrationTests(6) + s3ngIntegrationTests(12) + posixfsIntegrationTests(6) + ] + posixfsIntegrationTests(40) def coverage(): return { @@ -761,7 +753,7 @@ def posixfsIntegrationTests(parallelRuns, skipExceptParts = []): "environment": { "TEST_SERVER_URL": "http://revad-services:20080", "OCIS_REVA_DATA_ROOT": "/drone/src/tmp/reva/data/", - "DELETE_USER_DATA_CMD": "bash -cx 'for i in {1..30}; do rm -rf /drone/src/tmp/reva/data/users/* /drone/src/tmp/reva/data/indexes/by-type/* && break || sleep 5; done'", + "DELETE_USER_DATA_CMD": "bash -cx 'for i in {1..30}; do rm -rf /drone/src/tmp/reva/data/users/* /drone/src/tmp/reva/data/indexes/by-type/* && break || sleep 5; done; sleep 1'", "STORAGE_DRIVER": "ocis", "SKELETON_DIR": "/drone/src/tmp/testing/data/apiSkeleton", "TEST_WITH_LDAP": "true", @@ -772,6 +764,7 @@ def posixfsIntegrationTests(parallelRuns, skipExceptParts = []): "DIVIDE_INTO_NUM_PARTS": parallelRuns, "RUN_PART": runPart, "EXPECTED_FAILURES_FILE": "/drone/src/tests/acceptance/expected-failures-on-POSIX-storage.md", + "BEHAT_FEATURE": 'tests/acceptance/features/coreApiWebdavDelete/deleteFile.feature:35', "ACCEPTANCE_TEST_TYPE": "core-api", }, }, @@ -780,7 +773,6 @@ def posixfsIntegrationTests(parallelRuns, skipExceptParts = []): redisService(), ldapService(), ], - "depends_on": ["unit-test-coverage"], }, ) diff --git a/pkg/storage/fs/posix/tree/inotifywatcher.go b/pkg/storage/fs/posix/tree/inotifywatcher.go index 54b7157e0f..4bbbf37b9b 100644 --- a/pkg/storage/fs/posix/tree/inotifywatcher.go +++ b/pkg/storage/fs/posix/tree/inotifywatcher.go @@ -64,18 +64,18 @@ func (iw *InotifyWatcher) Watch(path string) { if isLockFile(event.Filename) || isTrash(event.Filename) || iw.tree.isUpload(event.Filename) { continue } - go func() { - switch e { - case inotifywaitgo.DELETE: - _ = iw.tree.Scan(event.Filename, ActionDelete, event.IsDir) - case inotifywaitgo.MOVED_FROM: - _ = iw.tree.Scan(event.Filename, ActionMoveFrom, event.IsDir) - case inotifywaitgo.CREATE, inotifywaitgo.MOVED_TO: - _ = iw.tree.Scan(event.Filename, ActionCreate, event.IsDir) - case inotifywaitgo.CLOSE_WRITE: - _ = iw.tree.Scan(event.Filename, ActionUpdate, event.IsDir) - } - }() + // go func() { + switch e { + case inotifywaitgo.DELETE: + _ = iw.tree.Scan(event.Filename, ActionDelete, event.IsDir) + case inotifywaitgo.MOVED_FROM: + _ = iw.tree.Scan(event.Filename, ActionMoveFrom, event.IsDir) + case inotifywaitgo.CREATE, inotifywaitgo.MOVED_TO: + _ = iw.tree.Scan(event.Filename, ActionCreate, event.IsDir) + case inotifywaitgo.CLOSE_WRITE: + _ = iw.tree.Scan(event.Filename, ActionUpdate, event.IsDir) + } + // }() } case err := <-errors: