Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading