Skip to content

Commit

Permalink
Do not reset ad break state on ad skip as there might be more ads
Browse files Browse the repository at this point in the history
  • Loading branch information
strangesource committed Jul 2, 2024
1 parent 7667a01 commit 3af6cf2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public void reportAdSkipped() {
Log.d(TAG, "No ad break active");
return;
}
isAdBreakActive = false;
Log.d(TAG, "Server side ad skipped");
convivaAdAnalytics.reportAdSkipped();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import io.mockk.mockk
import io.mockk.mockkStatic
import io.mockk.runs
import io.mockk.slot
import io.mockk.unmockkStatic
import io.mockk.verify
import org.junit.After
import org.junit.AfterClass
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Test
Expand Down Expand Up @@ -189,7 +191,7 @@ class DefaultSsaiApiTest {
ssaiApi.reportAdSkipped()

verify { adAnalytics.reportAdSkipped() }
expectThat(ssaiApi.isAdBreakActive).isFalse()
expectThat(ssaiApi.isAdBreakActive).isTrue()
}

@Test
Expand Down Expand Up @@ -245,5 +247,11 @@ class DefaultSsaiApiTest {
every { Log.i(any(), any()) } returns 0
every { Log.e(any(), any()) } returns 0
}

@JvmStatic
@AfterClass
fun afterClass() {
unmockkStatic(Log::class)
}
}
}

0 comments on commit 3af6cf2

Please sign in to comment.