Skip to content

Commit 44b0752

Browse files
committed
fix(tests)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent bfcae0a commit 44b0752

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -818,13 +818,13 @@ jobs:
818818
./occ background-job:worker 'OC\TaskProcessing\SynchronousBackgroundJob' &
819819
# Check for user admin: Should be there
820820
OUT_ADMIN_ENGLISH_PROMPT_AI=$(./occ context_chat:prompt admin "Which factors are taken into account for the Ethical AI Rating?")
821-
OUT_ADMIN_ENGLISH_PROMPT_AI=$(./occ context_chat:prompt admin "Welche Faktoren beeinflussen das Ethical AI Rating?")
821+
OUT_ADMIN_GERMAN_PROMPT_AI=$(./occ context_chat:prompt admin "Welche Faktoren beeinflussen das Ethical AI Rating?")
822822
OUT_ADMIN_SEARCH_AI=$(./occ context_chat:search admin "Welche Faktoren beeinflussen das Ethical AI Rating?")
823823
824824
# Check for user test: Shouldn't be there
825-
OUT_TEST_ENGLISH_PROMPT_AI=$(./occ context_chat:prompt test "Which factors are taken into account for the Ethical AI Rating?")
826-
OUT_TEST_GERMAN_PROMPT_AI=$(./occ context_chat:prompt test "Welche Faktoren beeinflussen das Ethical AI Rating?")
827-
OUT_TEST_SEARCH_AI=$(./occ context_chat:search test "Welche Faktoren beeinflussen das Ethical AI Rating?")
825+
OUT_TEST_ENGLISH_PROMPT_AI=$(./occ context_chat:prompt test "Which factors are taken into account for the Ethical AI Rating?" || echo '')
826+
OUT_TEST_GERMAN_PROMPT_AI=$(./occ context_chat:prompt test "Welche Faktoren beeinflussen das Ethical AI Rating?" || echo '')
827+
OUT_TEST_SEARCH_AI=$(./occ context_chat:search test "Welche Faktoren beeinflussen das Ethical AI Rating?" || echo '')
828828
829829
# Check for user test: Should be there, because it was shared
830830
OUT_TEST_PROMPT_JOBS=$(./occ context_chat:prompt test "How do I set my TimedJob to be time insensitive?")
@@ -833,7 +833,7 @@ jobs:
833833
set -x
834834
835835
echo "$OUT_ADMIN_ENGLISH_PROMPT_AI"
836-
echo "$OUT_ADMIN_ENGLISH_PROMPT_AI"
836+
echo "$OUT_ADMIN_GERMAN_PROMPT_AI"
837837
echo "$OUT_ADMIN_SEARCH_AI"
838838
echo "$OUT_TEST_ENGLISH_PROMPT_AI"
839839
echo "$OUT_TEST_GERMAN_PROMPT_AI"
@@ -844,7 +844,7 @@ jobs:
844844
set +x
845845
846846
echo "$OUT_ADMIN_ENGLISH_PROMPT_AI" | grep -q -v "If all of these points are met, we give a Green label." && echo 'Admin does not see AI overview anymore' || exit 1
847-
echo "$OUT_ADMIN_ENGLISH_PROMPT_AI" | grep -q -v "If all of these points are met, we give a Green label." && echo 'Admin does not see AI overview anymore, after german question' || exit 1
847+
echo "$OUT_ADMIN_GERMAN_PROMPT_AI" | grep -q -v "If all of these points are met, we give a Green label." && echo 'Admin does not see AI overview anymore, after german question' || exit 1
848848
echo "$OUT_ADMIN_SEARCH_AI" | grep -q -v "overview.rst" && echo 'Admin does not see AI overview anymore, when using search' || exit 1
849849
echo "$OUT_TEST_ENGLISH_PROMPT_AI" | grep -q -v "If all of these points are met, we give a Green label." && echo 'Test user does not see AI overview' || exit 1
850850
echo "$OUT_TEST_GERMAN_PROMPT_AI" | grep -q -v "If all of these points are met, we give a Green label." && echo 'Test user does not see AI overview, after german question' || exit 1

lib/BackgroundJobs/FileSystemListenerJob.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ protected function run($argument): void {
8383
}
8484

8585
try {
86-
try {
87-
switch ($fsEvent->getTypeObject()) {
88-
case FsEventType::CREATE:
89-
$this->fsEventService->onInsert($node);
90-
break;
91-
case FsEventType::ACCESS_UPDATE_DECL:
92-
$this->fsEventService->onAccessUpdateDecl($node);
93-
break;
94-
}
95-
$this->diagnosticService->sendHeartbeat(static::class, $this->getId());
96-
} catch (\RuntimeException $e) {
97-
$this->logger->warning('Error handling fs event "' . $fsEvent->getType() . '": ' . $e->getMessage(), ['exception' => $e]);
86+
switch ($fsEvent->getTypeObject()) {
87+
case FsEventType::CREATE:
88+
$this->fsEventService->onInsert($node);
89+
break;
90+
case FsEventType::ACCESS_UPDATE_DECL:
91+
$this->fsEventService->onAccessUpdateDecl($node);
92+
break;
9893
}
94+
$this->diagnosticService->sendHeartbeat(static::class, $this->getId());
95+
} catch (\Throwable $e) {
96+
$this->logger->warning('Error handling fs event "' . $fsEvent->getType() . '": ' . $e->getMessage(), ['exception' => $e]);
97+
}
98+
try {
9999
$this->fsEventMapper->delete($fsEvent);
100100
} catch (Exception $e) {
101101
$this->logger->warning('Error deleting fs event "' . $fsEvent->getType() . '": ' . $e->getMessage(), ['exception' => $e]);

0 commit comments

Comments
 (0)