Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Note Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
repository/gorm/stamp_test.go (1)
249-263:⚠️ Potential issue | 🟠 Major
assert.LenはEntityではなくValue()に対して実行してください。
GetAllStampsWithThumbnailの戻り値が*etag.Entityに変わったため、assert.Len(arr, n*2)は長さ判定に失敗します。両テストでarr.Value()を使う必要があります。🩹 修正案
- assert.Len(arr, n*2) + assert.Len(arr.Value(), n*2) @@ - assert.Len(arr, n*2) + assert.Len(arr.Value(), n*2)Also applies to: 264-277
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@repository/gorm/stamp_test.go` around lines 249 - 263, The failing length assertions call assert.Len on the etag.Entity pointer returned by repo.GetAllStampsWithThumbnail; update the tests to call .Value() when checking lengths (e.g., replace assert.Len(arr, n*2) with assert.Len(arr.Value(), n*2)) in the test block that uses repo.GetAllStampsWithThumbnail and the adjacent similar test (both places where arr is used), ensuring any other assertions referencing arr for length use arr.Value().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@repository/gorm/stamp_test.go`:
- Around line 249-263: The failing length assertions call assert.Len on the
etag.Entity pointer returned by repo.GetAllStampsWithThumbnail; update the tests
to call .Value() when checking lengths (e.g., replace assert.Len(arr, n*2) with
assert.Len(arr.Value(), n*2)) in the test block that uses
repo.GetAllStampsWithThumbnail and the adjacent similar test (both places where
arr is used), ensuring any other assertions referencing arr for length use
arr.Value().
|
Request timed out after 900000ms (requestId=d4ab6312-1585-409b-89f9-810f2c4bfd9d) |
fixes #2948
実装内容
etag.Entity[T any]を実装比較
Before
304が返っているリクエストもETagの計算がボトルネックになってあまり高速化していない
After
特にキャッシュなしでのレスポンスが遅くサイズが大きいunicodeで改善
originalは数が少ないので304でも200と±20msくらいしか変わらなそう
Summary by CodeRabbit
New Features
Refactor
Tests