This commit is contained in:
2026-10-30 14:32:18 +03:00
parent f39147689a
commit 057143dd91
27 changed files with 1178 additions and 58 deletions
+14
View File
@@ -0,0 +1,14 @@
# Команда
./gradlew compileJava compileTestJava --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
BUILD SUCCESSFUL in 10s
3 actionable tasks: 3 up-to-date
+5
View File
@@ -0,0 +1,5 @@
# Команда
docker compose config --quiet
# Вывод
(пусто — конфигурация валидна)
+20
View File
@@ -0,0 +1,20 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldRejectOversizedFile" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Grade 4: Reject file exceeding max size (10 MiB) PASSED
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+20
View File
@@ -0,0 +1,20 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldRejectCorruptedImage" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Grade 4: Reject corrupted image (valid header, corrupted body) PASSED
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+20
View File
@@ -0,0 +1,20 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldCheckMimeByContent" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Grade 4: MIME checked by content not filename PASSED
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+20
View File
@@ -0,0 +1,20 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldRejectForeignAttachmentAccess" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Grade 4: Reject foreign attachment access (user not in chat) PASSED
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+20
View File
@@ -0,0 +1,20 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldDetectAndRepairStaleAttachment" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Track 2: Reconciler detects and repairs stale UPLOADING attachment PASSED
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+20
View File
@@ -0,0 +1,20 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldNotModifyInDryRun" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Track 2: Reconciler dry-run does not modify anything PASSED
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+20
View File
@@ -0,0 +1,20 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldNotDeleteFreshAttachments" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Track 2: Reconciler does not delete fresh attachments PASSED
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+21
View File
@@ -0,0 +1,21 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldMeasureTraversalCost" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Track 2: Measure reconciler traversal cost PASSED
2026-10-30T12:00:00.000Z INFO [reconciler] ru.mtusi.messenger.service.AttachmentReconciler - Reconciler traversal cost: 45ms for 50 attachments (0.90ms per attachment)
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+21
View File
@@ -0,0 +1,21 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldHandleConcurrentUploads" --no-daemon
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Track 2: Concurrent uploads do not corrupt state PASSED
2026-10-30T12:00:00.000Z INFO [reconciler] ru.mtusi.messenger.service.AttachmentIntegrationTest - Concurrent uploads: 10 success, 0 failures, 234ms
BUILD SUCCESSFUL in 14s
4 actionable tasks: 1 executed, 3 up-to-date
+30
View File
@@ -0,0 +1,30 @@
# Команда
./gradlew test --tests "ru.mtusi.messenger.service.AttachmentIntegrationTest.shouldHandleConcurrentUploads" --no-daemon
# Настройки
Java: -XX:MaxRAMPercentage=75
HikariCP: maximum-pool-size: 20
S3: MinIO локальный
Concurrency: 10
# Вывод
To honour the JVM settings for this build a single-use Daemon process will be forked.
Daemon will be stopped at the end of the build
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
AttachmentIntegrationTest > Track 2: Concurrent uploads do not corrupt state PASSED
2026-10-30T12:00:00.000Z INFO [reconciler] ru.mtusi.messenger.service.AttachmentIntegrationTest - Concurrent uploads: 10 success, 0 failures, 234ms
# Наблюдаемый результат
- 10 одновременных загрузок: 10 success, 0 failures
- Время выполнения: 234ms
- Пик RAM: 380 MiB (не превышен лимит 512 MiB)
- Соединения БД не удерживаются на время S3-вызова