docs(report): complete lab 5 report

This commit is contained in:
kk10
2026-11-17 11:17:07 +03:00
parent 179c795758
commit 346720166b
5 changed files with 247 additions and 14 deletions
+68
View File
@@ -0,0 +1,68 @@
> make contract-go
go test -tags=contract ./student-tests/... -v -args -base-url=http://localhost:8080
=== RUN TestAttachmentJPEG
--- PASS: TestAttachmentJPEG (0.42s)
=== RUN TestAttachmentTooManyPixels
--- PASS: TestAttachmentTooManyPixels (2.12s)
=== RUN TestAttachmentUnsafeFilename
--- PASS: TestAttachmentUnsafeFilename (0.14s)
=== RUN TestAttachmentTooLarge
--- PASS: TestAttachmentTooLarge (0.22s)
=== RUN TestAttachmentCorruptedImage
--- PASS: TestAttachmentCorruptedImage (0.22s)
=== RUN TestAttachmentMimeSubstitution
--- PASS: TestAttachmentMimeSubstitution (0.16s)
=== RUN TestAttachmentForeignID
--- PASS: TestAttachmentForeignID (0.22s)
=== RUN TestAttachmentFromAnotherChat
--- PASS: TestAttachmentFromAnotherChat (1.02s)
=== RUN TestCreateChatRollback
--- PASS: TestCreateChatRollback (0.16s)
=== RUN TestInvalidJSON
--- PASS: TestInvalidJSON (0.00s)
=== RUN TestForeignChat
--- PASS: TestForeignChat (0.60s)
=== RUN TestEmptyMessage
--- PASS: TestEmptyMessage (0.20s)
=== RUN TestDuplicateUsername
--- PASS: TestDuplicateUsername (0.24s)
=== RUN TestPagination
--- PASS: TestPagination (0.31s)
=== RUN TestThumbnail
=== RUN TestThumbnail/landscape
=== RUN TestThumbnail/portrait
=== RUN TestThumbnail/small
=== RUN TestThumbnail/thin
--- PASS: TestThumbnail (2.18s)
--- PASS: TestThumbnail/landscape (0.35s)
--- PASS: TestThumbnail/portrait (0.62s)
--- PASS: TestThumbnail/small (0.40s)
--- PASS: TestThumbnail/thin (0.82s)
=== RUN TestVariantsEXIF
=== RUN TestVariantsEXIF/thumbnail
=== RUN TestVariantsEXIF/optimized
--- PASS: TestVariantsEXIF (1.19s)
--- PASS: TestVariantsEXIF/thumbnail (0.80s)
--- PASS: TestVariantsEXIF/optimized (0.39s)
=== RUN TestCrop
=== RUN TestCrop/landscape
=== RUN TestCrop/portrait
=== RUN TestCrop/small
--- PASS: TestCrop (1.61s)
--- PASS: TestCrop/landscape (0.62s)
--- PASS: TestCrop/portrait (0.39s)
--- PASS: TestCrop/small (0.60s)
=== RUN TestOptimized
=== RUN TestOptimized/landscape
=== RUN TestOptimized/portrait
=== RUN TestOptimized/small
--- PASS: TestOptimized (2.50s)
--- PASS: TestOptimized/landscape (0.84s)
--- PASS: TestOptimized/portrait (1.06s)
--- PASS: TestOptimized/small (0.59s)
=== RUN TestLoginWrongPassword
--- PASS: TestLoginWrongPassword (0.22s)
=== RUN TestLogout
--- PASS: TestLogout (0.18s)
PASS
ok mtusi2026-messenger/student-tests 13.930s
+3
View File
@@ -0,0 +1,3 @@
> make test
python3 tests/smoke.py --base-url "http://localhost:8080"
PASS: lab5 public API scenario; infrastructure and grading evidence remain separate.
+13
View File
@@ -0,0 +1,13 @@
> make pipeline-go
go test -count=1 -tags=nodynamic,pipeline ./student-tests/... -v -args -base-url=http://localhost:8080
=== RUN TestPipelineStaleProcessing
pipeline_fault_test.go:174: PASS attachment=01a1e881-531b-7c12-8bcc-1bb759d11d06: held v1 PUT; v2 ready; late v1 wrote S3 but could not replace v2; stale redelivery acknowledged
--- PASS: TestPipelineStaleProcessing (12.67s)
=== RUN TestPipelineReorderAndDuplicate
pipeline_fault_test.go:245: PASS attachment=01a1e881-8af0-70c3-a95d-6fde917efa7f: v2 completed before v1 delivery; stale v1 and duplicate v2 acknowledged without changes
--- PASS: TestPipelineReorderAndDuplicate (41.43s)
=== RUN TestPipelineCrashBeforeWrite
pipeline_fault_test.go:301: PASS attachment=01a1e882-22d9-749f-ad66-36ecf038165b: SIGKILL before first result PUT; natural lease recovery; same job ready on v2 attempt2
--- PASS: TestPipelineCrashBeforeWrite (26.05s)
PASS
ok mtusi2026-messenger/student-tests 80.150s
+40
View File
@@ -0,0 +1,40 @@
> docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab5-api-1 mtusi-messenger:lab5 "/app/server" api 35 minutes ago Up 35 minutes (healthy) 8080/tcp
mtusi2026lab5-api-2 mtusi-messenger:lab5 "/app/server" api 35 minutes ago Up 35 minutes (healthy) 8080/tcp
mtusi2026lab5-load_balancer-1 nginx:1.31.7-alpine3.24 "/docker-entrypoint.…" load_balancer 35 minutes ago Up 35 minutes 127.0.0.1:8080->8080/tcp
mtusi2026lab5-postgres-1 postgres:18.6 "docker-entrypoint.s…" postgres 35 minutes ago Up 35 minutes (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab5-rabbitmq-1 rabbitmq:4.2.9-alpine "/bin/sh -ec 'RABBIT…" rabbitmq 35 minutes ago Up 35 minutes (healthy) 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp
mtusi2026lab5-redis-1 redis:8.8.3-alpine3.23 "docker-entrypoint.s…" redis 35 minutes ago Up 35 minutes (healthy) 6379/tcp
mtusi2026lab5-s3-1 chrislusf/seaweedfs:4.51 "/entrypoint.sh serv…" s3 35 minutes ago Up 35 minutes (healthy) 7333/tcp, 8080/tcp, 8333/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp
mtusi2026lab5-worker-1 mtusi-messenger-worker:lab5 "/app/worker" worker 35 minutes ago Up 35 minutes
> make worker-go
go test -count=1 -tags=worker ./student-tests/... -v -args -base-url=http://localhost:8080
=== RUN TestWorkerPersistenceAndDuplicate
worker_test.go:116: PASS attachment=01a1e86c-a8f6-7816-82aa-f21d58b7d859: queued survives API/broker restart; ready; duplicate acknowledged with unchanged result
--- PASS: TestWorkerPersistenceAndDuplicate (33.88s)
=== RUN TestWorkerRetryExhausted
worker_test.go:161: PASS attachment=01a1e86d-245d-78aa-b370-288b7b9aae01: 5 attempts, failed/retry_exhausted, content/link rejected
--- PASS: TestWorkerRetryExhausted (39.01s)
=== RUN TestWorkerProcessingTimeout
--- PASS: TestWorkerProcessingTimeout (10.11s)
=== RUN TestWorkerReplay
--- PASS: TestWorkerReplay (15.20s)
=== RUN TestWorkerOutboxRecovery
worker_test.go:342: PASS attachment=01a1e86e-2d67-70db-98e7-ea3f137bb7c1: commit, API SIGKILL before publication, automatic outbox recovery, same job ready
--- PASS: TestWorkerOutboxRecovery (33.15s)
=== RUN TestWorkerLeaseRecovery
worker_test.go:425: PASS attachment=01a1e86e-b2b4-7d23-a1cb-0ba40351a02f: SIGKILL after S3 writes, expired lease recovered, same job ready on attempt 2
--- PASS: TestWorkerLeaseRecovery (26.54s)
PASS
ok mtusi2026-messenger/student-tests 157.912s
> docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab5-api-1 mtusi-messenger:lab5 "/app/server" api 38 minutes ago Up About a minute (healthy) 8080/tcp
mtusi2026lab5-api-2 mtusi-messenger:lab5 "/app/server" api 38 minutes ago Up About a minute (healthy) 8080/tcp
mtusi2026lab5-load_balancer-1 nginx:1.31.7-alpine3.24 "/docker-entrypoint.…" load_balancer 38 minutes ago Up 38 minutes 127.0.0.1:8080->8080/tcp
mtusi2026lab5-postgres-1 postgres:18.6 "docker-entrypoint.s…" postgres 39 minutes ago Up 38 minutes (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab5-rabbitmq-1 rabbitmq:4.2.9-alpine "/bin/sh -ec 'RABBIT…" rabbitmq 2 minutes ago Up About a minute (healthy) 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp
mtusi2026lab5-redis-1 redis:8.8.3-alpine3.23 "docker-entrypoint.s…" redis 39 minutes ago Up 38 minutes (healthy) 6379/tcp
mtusi2026lab5-s3-1 chrislusf/seaweedfs:4.51 "/entrypoint.sh serv…" s3 38 minutes ago Up 38 minutes (healthy) 7333/tcp, 8080/tcp, 8333/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp
mtusi2026lab5-worker-1 mtusi-messenger-worker:lab5 "/app/worker" worker 38 minutes ago Up 41 seconds