Skip to content

Commit

Permalink
Fix concurrent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bidetofevil committed Sep 23, 2024
1 parent eaca61e commit ec9d3c3
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import io.embrace.android.embracesdk.internal.payload.SessionPayload
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Before
import org.junit.Ignore
import org.junit.Test

internal class EmbraceCacheServiceConcurrentAccessTest {
Expand All @@ -40,7 +39,6 @@ internal class EmbraceCacheServiceConcurrentAccessTest {
)
}

@Ignore("Failing in CI after switching to different image")
@Test
fun `concurrent write attempts to the same non-existent session file should lead to last finished persist`() {
val type = Envelope.sessionEnvelopeType
Expand All @@ -59,7 +57,6 @@ internal class EmbraceCacheServiceConcurrentAccessTest {
)
}

@Ignore("Failing in CI after switching to different image")
@Test
fun `accessing sessions with different names should not block`() {
val type = Envelope.sessionEnvelopeType
Expand All @@ -72,7 +69,6 @@ internal class EmbraceCacheServiceConcurrentAccessTest {
)
}

@Ignore("Failing in CI after switching to different image")
@Test
fun `reading a session should not block other reads to same session`() {
val type = Envelope.sessionEnvelopeType
Expand All @@ -85,7 +81,6 @@ internal class EmbraceCacheServiceConcurrentAccessTest {
)
}

@Ignore("Failing in CI after switching to different image")
@Test
fun `reads should block writes`() {
val type = Envelope.sessionEnvelopeType
Expand All @@ -106,7 +101,6 @@ internal class EmbraceCacheServiceConcurrentAccessTest {
)
}

@Ignore("Failing in CI after switching to different image")
@Test
fun `reading a file that is being written to should block and succeed`() {
var readSession: Envelope<SessionPayload>? = null
Expand All @@ -121,7 +115,6 @@ internal class EmbraceCacheServiceConcurrentAccessTest {
assertEquals(executionCoordinator.getErrorMessage(), testSessionEnvelope.getSessionId(), readSession?.getSessionId())
}

@Ignore("Failing in CI after switching to different image")
@Test
fun `reading a file that is being rewritten to should block and succeed`() {
var readSession: Envelope<SessionPayload>? = null
Expand All @@ -143,7 +136,6 @@ internal class EmbraceCacheServiceConcurrentAccessTest {
)
}

@Ignore("Failing in CI after switching to different image")
@Test
fun `interrupting a session write should not leave a file`() {
val type = Envelope.sessionEnvelopeType
Expand All @@ -157,7 +149,6 @@ internal class EmbraceCacheServiceConcurrentAccessTest {
assertNull(embraceCacheService.loadObject(FILENAME, type))
}

@Ignore("Failing in CI after switching to different image")
@Test
fun `interrupting a session rewrite should not overwrite the file`() {
val type = Envelope.sessionEnvelopeType
Expand Down

0 comments on commit ec9d3c3

Please sign in to comment.