Skip to content

Commit 24863b3

Browse files
authored
Merge pull request #295 from adamint/dev
temporarily disable client player api tests due to flakiness
2 parents 0e20b22 + 26a711a commit 24863b3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/commonTest/kotlin/com.adamratzman/spotify/TestUtilities.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package com.adamratzman.spotify
44
abstract class AbstractTest<T : GenericSpotifyApi> {
55
var api: T? = null
66

7-
fun testPrereq() = api != null
7+
open fun testPrereq() = api != null
88

99
suspend inline fun <reified Z : T> build(): Boolean {
1010
return try {

src/commonTest/kotlin/com.adamratzman/spotify/priv/ClientPlayerApiTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.adamratzman.spotify.priv
33

44
import com.adamratzman.spotify.AbstractTest
55
import com.adamratzman.spotify.SpotifyClientApi
6+
import com.adamratzman.spotify.getEnvironmentVariable
67
import com.adamratzman.spotify.models.CurrentlyPlayingType
78
import com.adamratzman.spotify.models.PlayableUri
89
import com.adamratzman.spotify.models.SpotifyContextType
@@ -25,6 +26,10 @@ import kotlinx.coroutines.delay
2526

2627
@ExperimentalTime
2728
class ClientPlayerApiTest : AbstractTest<SpotifyClientApi>() {
29+
override fun testPrereq(): Boolean {
30+
return super.testPrereq() && getEnvironmentVariable("SPOTIFY_ENABLE_PLAYER_TESTS")?.toBoolean() == true
31+
}
32+
2833
@Test
2934
fun testGetDevices() {
3035
return runBlockingTest {

0 commit comments

Comments
 (0)