Skip to content

Commit

Permalink
WIP: Debug flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Nov 13, 2024
1 parent e77dd61 commit 0c365f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
14 changes: 3 additions & 11 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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",
Expand All @@ -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",
},
},
Expand All @@ -780,7 +773,6 @@ def posixfsIntegrationTests(parallelRuns, skipExceptParts = []):
redisService(),
ldapService(),
],
"depends_on": ["unit-test-coverage"],
},
)

Expand Down
24 changes: 12 additions & 12 deletions pkg/storage/fs/posix/tree/inotifywatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0c365f4

Please sign in to comment.