Skip to content

Commit

Permalink
Merge branch '8.x.x' into feat/disable-continue-trace-based-on-ignore…
Browse files Browse the repository at this point in the history
…d-span-origins
  • Loading branch information
adinauer authored Dec 5, 2024
2 parents 96f4647 + 339b7e0 commit a78c181
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sentry/src/main/java/io/sentry/DisabledQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public int size() {
*/
@Override
public boolean isEmpty() {
return false;
return true;
}

/** Does nothing. */
Expand Down
9 changes: 5 additions & 4 deletions sentry/src/test/java/io/sentry/DisabledQueueTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNull
import kotlin.test.assertTrue

class DisabledQueueTest {

Expand All @@ -22,17 +23,17 @@ class DisabledQueueTest {
}

@Test
fun `isEmpty returns false when created`() {
fun `isEmpty returns true when created`() {
val queue = DisabledQueue<Int>()
assertFalse(queue.isEmpty(), "isEmpty should always return false.")
assertTrue(queue.isEmpty(), "isEmpty should always return true.")
}

@Test
fun `isEmpty always returns false if add function was called`() {
fun `isEmpty always returns true if add function was called`() {
val queue = DisabledQueue<Int>()
queue.add(1)

assertFalse(queue.isEmpty(), "isEmpty should always return false.")
assertTrue(queue.isEmpty(), "isEmpty should always return true.")
}

@Test
Expand Down

0 comments on commit a78c181

Please sign in to comment.