diff --git a/backend/internal/repository/group_usage_rollup_trigger_integration_test.go b/backend/internal/repository/group_usage_rollup_trigger_integration_test.go index db182be495..bd9059330a 100644 --- a/backend/internal/repository/group_usage_rollup_trigger_integration_test.go +++ b/backend/internal/repository/group_usage_rollup_trigger_integration_test.go @@ -130,6 +130,7 @@ func TestGroupUsageRollupTriggerSerializesInsertTransactionAcrossMidnight(t *tes schema := createGroupUsageRollupTriggerTestSchema(t, ctx, false) seedTx := beginGroupUsageRollupTriggerTestTx(t, ctx, schema) _, err := seedTx.ExecContext(ctx, ` + SET LOCAL TIME ZONE 'Asia/Shanghai'; INSERT INTO groups (id) VALUES (10); INSERT INTO users (id) VALUES (1); UPDATE usage_group_rollup_state @@ -151,6 +152,8 @@ func TestGroupUsageRollupTriggerSerializesInsertTransactionAcrossMidnight(t *tes insertTx := beginGroupUsageRollupTriggerTestTx(t, ctx, schema) defer func() { _ = insertTx.Rollback() }() + _, err = insertTx.ExecContext(ctx, "SET LOCAL TIME ZONE 'Asia/Shanghai'") + require.NoError(t, err) var insertBackendPID int require.NoError(t, insertTx.QueryRowContext(ctx, "SELECT pg_backend_pid()").Scan(&insertBackendPID)) @@ -207,6 +210,7 @@ func TestGroupUsageRollupTriggerKeepsWatermarkForTodayInsert(t *testing.T) { tx := beginGroupUsageRollupTriggerTestTx(t, ctx, schema) defer func() { _ = tx.Rollback() }() _, err := tx.ExecContext(ctx, ` + SET LOCAL TIME ZONE 'Asia/Shanghai'; INSERT INTO groups (id) VALUES (10); INSERT INTO users (id) VALUES (1); UPDATE usage_group_rollup_state