Skip to content

Androidtest#268

Open
Ethran wants to merge 5 commits into
mainfrom
androidtest
Open

Androidtest#268
Ethran wants to merge 5 commits into
mainfrom
androidtest

Conversation

@Ethran

@Ethran Ethran commented May 31, 2026

Copy link
Copy Markdown
Owner

No description provided.

mwichro and others added 5 commits May 31, 2026 20:18
GlobalAppSettingsConcurrencyTest, SnapshotStateMapConcurrencyTest: add synchronization to background writers to prevent SnapshotApplyConflictException while validating concurrent reader stability.
EditorViewModel: ensure selection state reset occurs on the Main thread to avoid concurrent change exceptions during composition.
TestNotebookSeeder: add utility to programmatically seed notebooks and strokes for deterministic testing.
TestDatabaseFactory: add helper for creating in-memory or asset-based test databases.
EditorUnsupportedConcurrentChangeTests: add regression tests to detect off-main-thread writes to selection state.
MigrationTest: improve resource management and column lookup in database migration tests.
Add comprehensive documentation for testing with real and seeded databases.
Update existing instrumentation tests with timeouts and add necessary test dependencies.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 8 comments.

Comment thread app/build.gradle
implementation 'androidx.fragment:fragment-ktx:1.8.9'
implementation 'androidx.graphics:graphics-core:1.0.4'
implementation 'androidx.input:input-motionprediction:1.0.0'
implementation 'androidx.test.ext:junit-ktx:1.3.0'
Comment on lines +4 to +6
<activity
android:name="com.ethran.notable.testing.TestActivity"
android:exported="true" />
Comment on lines +92 to +95
start.countDown()
writersDone.await(30, TimeUnit.SECONDS)
readerDone.await(30, TimeUnit.SECONDS)
pool.shutdownNow()
Comment on lines +139 to +141
start.countDown()
done.await(30, TimeUnit.SECONDS)
pool.shutdownNow()
Comment on lines +85 to +88
start.countDown()
writersDone.await(30, TimeUnit.SECONDS)
readerDone.await(30, TimeUnit.SECONDS)
pool.shutdownNow()
Comment on lines +155 to +156
val watchedStates = viewModel.selectionState.snapshotDelegateStatesForTest()
android.util.Log.d(LOG_TAG, "Watching ${watchedStates.size} state objects")
Comment on lines +25 to +28
Pros:
- 100% deterministic
- Fast
- No need to keep binary files in the repo
)

/**
* Simple, deterministic data seeder for tests.
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.

3 participants