• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 39775588260
92%

Build:
DEFAULT BRANCH: main
Ran 22 Oct 2026 12:08PM UTC
Jobs 11
Files 174
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Oct 2026 12:05PM UTC coverage: 91.762%. Remained the same
39775588260

push

github

web-flow
fix(supabase_flutter): dispose Supabase inside testWidgets without hanging (#2012)

Fixes [SDK-2330](https://linear.app/supabase/issue/SDK-2330).

## Problem

The documented `initializeTestSupabase` pattern hung inside
`testWidgets` until the test timed out:

```dart
final supabase = await initializeTestSupabase(httpClient: httpClient);
addTearDown(supabase.dispose);
```

Initialization and queries actually completed. The hang was in
`Supabase.dispose`, for two reasons:

1. The `Supabase` singleton is created lazily, so in a widget test it is
created inside the first test's fake async zone, and so is its lifecycle
queue, which started as `Future.value()`. Awaiting an already completed
future schedules the continuation in that future's zone. Nobody flushes
that fake zone after the test body ends, so `dispose` hung in
`addTearDown` and in every later test.
2. `SupabaseClient.dispose` awaited the cancel of the auth state
subscription. A broadcast subscription's cancel returns the root zone's
null future, so `dispose` resumed outside the fake zone, and its next
await never completed. This hit `dispose` called inside the test body.

## Changes

- `Supabase` keeps the lifecycle queue `null` while nothing is in
flight, so `dispose` only awaits a lifecycle operation that is actually
running.
- `SupabaseClient.dispose` no longer awaits the cancel of the auth state
subscription, which takes effect immediately.
- Added widget tests to `testing_test.dart` that use the plain `await`
pattern: a widget queries through `MockSupabaseHttpClient` during
`pumpWidget` and settles with `pumpAndSettle`, twice in a row, plus a
test that disposes inside the body. They run before the `test()` cases
so the singleton is created in a fake zone. Without the fix they hang.

The README and the `initializeTestSupabase` dartdoc already show the
plain `await` pattern, which now works, so `tester.runAsync` is not
needed.

13 of 13 new or added lines in 2 files covered. (100.0%)

7 existing lines in 2 files now uncovered.

10705 of 11666 relevant lines covered (91.76%)

5.39 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
95.6
0.0% packages/supabase/lib/src/supabase_client.dart
3
94.96
0.0% packages/supabase_flutter/lib/src/supabase.dart
Jobs
ID Job ID Ran Files Coverage
10 supabase_functions - 39775588260.10 22 Oct 2026 12:08PM UTC 4
93.28
GitHub Action Run
11 iceberg - 39775588260.11 22 Oct 2026 12:08PM UTC 6
71.32
GitHub Action Run
6 supabase_storage - 39768280064.6 22 Oct 2026 11:11AM UTC 10
96.26
GitHub Action Run
7 supabase - 39768280064.7 22 Oct 2026 11:12AM UTC 20
93.48
GitHub Action Run
9 supabase_auth - 39768280064.9 22 Oct 2026 11:12AM UTC 34
93.38
GitHub Action Run
11 supabase_common - 39605471296.11 21 Oct 2026 01:10PM UTC 35
93.58
GitHub Action Run
10 supabase_typegen - 39768280064.10 22 Oct 2026 11:09AM UTC 6
94.36
GitHub Action Run
3 postgrest - 39768280064.3 22 Oct 2026 11:11AM UTC 28
91.95
GitHub Action Run
11 supabase_realtime - 39768280064.11 22 Oct 2026 11:11AM UTC 14
91.17
GitHub Action Run
4 supabase_flutter - 39768280064.4 22 Oct 2026 11:09AM UTC 16
80.85
GitHub Action Run
9 yet_another_json_isolate - 39603824352.9 21 Oct 2026 12:58PM UTC 1
98.44
GitHub Action Run
Source Files on build 39775588260
  • Tree
  • List 174
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39775588260
  • 05184afb on github
  • Prev Build on main (#39775457039)
  • Next Build on main (#39775993593)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc