Skip to content

test: fix GitHubIssue3878Test - materialized view empty due to uncommitted setup data#3954

Merged
robfrank merged 1 commit intomainfrom
fix/materialized-view-failing-tests
Apr 22, 2026
Merged

test: fix GitHubIssue3878Test - materialized view empty due to uncommitted setup data#3954
robfrank merged 1 commit intomainfrom
fix/materialized-view-failing-tests

Conversation

@robfrank
Copy link
Copy Markdown
Collaborator

Summary

  • GitHubIssue3878Test used autoStartTx = true, causing beginTest() to run inside an uncommitted transaction
  • MaterializedViewRefresher.fullRefresh() creates a dedicated transaction with joinCurrentTx=false that cannot see uncommitted data under snapshot isolation — so both materialized views were created empty
  • Fix: remove autoStartTx, wrap INSERTs in database.transaction() so test data is committed before the view's initial fullRefresh runs (matching the pattern in MaterializedViewSQLTest)

Test plan

  • All 4 tests in GitHubIssue3878Test now pass (Tests run: 4, Failures: 0, Errors: 0)

🤖 Generated with Claude Code

…lized view refresh

The test used autoStartTx=true which left INSERT data in an uncommitted
transaction. MaterializedViewRefresher.fullRefresh() creates a dedicated
transaction (joinCurrentTx=false) that cannot see uncommitted data under
snapshot isolation, resulting in empty materialized views.

Fix: remove autoStartTx, wrap INSERTs in database.transaction() so the
data is committed before the view's initial fullRefresh runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 22, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · -7.51% coverage variation

Metric Results
Coverage variation -7.51% coverage variation
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (582167a) 118917 86638 72.86%
Head commit (6545f07) 150156 (+31239) 98120 (+11482) 65.35% (-7.51%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3954) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes. Give us feedback

@robfrank robfrank merged commit 727c21e into main Apr 22, 2026
9 of 12 checks passed
@robfrank robfrank deleted the fix/materialized-view-failing-tests branch April 22, 2026 08:52
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the GitHubIssue3878Test class by removing the automatic transaction start configuration and instead wrapping the document insertion commands within an explicit transaction block in the beginTest method. I have no feedback to provide as there were no review comments.

@lvca lvca added this to the 26.4.1 milestone Apr 22, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.45%. Comparing base (582167a) to head (6545f07).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3954      +/-   ##
==========================================
+ Coverage   64.00%   64.45%   +0.44%     
==========================================
  Files        1591     1591              
  Lines      118917   118917              
  Branches    25271    25271              
==========================================
+ Hits        76118    76652     +534     
+ Misses      32309    31681     -628     
- Partials    10490    10584      +94     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

mergify Bot added a commit that referenced this pull request May 3, 2026
…o [skip ci]

Bumps [marked](https://github.com/markedjs/marked) from 18.0.2 to 18.0.3.
Release notes

*Sourced from [marked's releases](https://github.com/markedjs/marked/releases).*

> v18.0.3
> -------
>
> [18.0.3](markedjs/marked@v18.0.2...v18.0.3) (2026-05-01)
> -----------------------------------------------------------------------------------
>
> ### Bug Fixes
>
> * avoid task checkbox for setext heading text ([#3960](https://redirect.github.com/markedjs/marked/issues/3960)) ([2608e81](markedjs/marked@2608e81))


Commits

* [`e8dc395`](markedjs/marked@e8dc395) chore(release): 18.0.3 [skip ci]
* [`2608e81`](markedjs/marked@2608e81) fix: avoid task checkbox for setext heading text ([#3960](https://redirect.github.com/markedjs/marked/issues/3960))
* [`dba76f6`](markedjs/marked@dba76f6) chore(deps-dev): bump eslint from 10.2.0 to 10.2.1 ([#3953](https://redirect.github.com/markedjs/marked/issues/3953))
* [`015f1eb`](markedjs/marked@015f1eb) chore(deps-dev): bump typescript from 6.0.2 to 6.0.3 ([#3954](https://redirect.github.com/markedjs/marked/issues/3954))
* [`17c06e9`](markedjs/marked@17c06e9) chore: fix building license for docs ([#3952](https://redirect.github.com/markedjs/marked/issues/3952))
* [`55a54b5`](markedjs/marked@55a54b5) chore: Rename LICENSE.md to LICENSE for better compatibility with Bazel tooli...
* See full diff in [compare view](markedjs/marked@v18.0.2...v18.0.3)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=marked&package-manager=npm\_and\_yarn&previous-version=18.0.2&new-version=18.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants