mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
fix: auto-driver trial rolls back when the display driver crashes at startup (#1031)
This commit is contained in:
1 parent
e865fa6b62
commit
e0b3f928a6
3 files changed
+39
-4
No files matched your search
@@ -62,4 +62,25 @@ class AutoDriverTrialTest {
|
||||
assertNull(AutoDriverTrial.rollbackDue(context))
|
||||
assertEquals("banner@r5", AutoDriverTrial.current(context)?.release)
|
||||
}
|
||||
|
||||
@Test fun displayDriverCrashesBeforeSessionStartStillCount() {
|
||||
AutoDriverTrial.displayStarting(context, "new-display")
|
||||
assertNull(AutoDriverTrial.rollbackDue(context))
|
||||
AutoDriverTrial.displayStarting(context, "new-display")
|
||||
assertEquals(2, AutoDriverTrial.rollbackDue(context)?.starts)
|
||||
}
|
||||
|
||||
@Test fun aNormalStartIsCountedOnce() {
|
||||
AutoDriverTrial.displayStarting(context, "new-display")
|
||||
AutoDriverTrial.sessionStarting(context, "new-display", "new-linux")
|
||||
assertEquals(1, AutoDriverTrial.current(context)?.starts)
|
||||
AutoDriverTrial.displayStarting(context, "other-display")
|
||||
assertEquals(1, AutoDriverTrial.current(context)?.starts)
|
||||
}
|
||||
|
||||
@Test fun aTrialStartedBeforeDisplayCountingStillRollsBackOnTheNextCrash() {
|
||||
AutoDriverTrial.sessionStarting(context, "new-display", "new-linux")
|
||||
AutoDriverTrial.displayStarting(context, "new-display")
|
||||
assertEquals(2, AutoDriverTrial.rollbackDue(context)?.starts)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user