From 187221c082e585f14dddb183f12963ac2aaa1081 Mon Sep 17 00:00:00 2001 From: Nate Anderson Date: Wed, 10 Jul 2024 14:03:07 -0700 Subject: [PATCH] Temp commit to debug the github issue mk3 --- .../kotlin/sdk/CacheClientScalarTest.kt | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/androidInstrumentedTest/kotlin/software/momento/kotlin/sdk/CacheClientScalarTest.kt b/src/androidInstrumentedTest/kotlin/software/momento/kotlin/sdk/CacheClientScalarTest.kt index 95b29b2..93136ca 100644 --- a/src/androidInstrumentedTest/kotlin/software/momento/kotlin/sdk/CacheClientScalarTest.kt +++ b/src/androidInstrumentedTest/kotlin/software/momento/kotlin/sdk/CacheClientScalarTest.kt @@ -38,30 +38,18 @@ class CacheClientScalarTest: BaseAndroidTestClass() { val key = "cache-key" val value = "cache-value" - var getResponse = cacheClient.get(cacheName, key) - if (getResponse is GetResponse.Error) { - val error = getResponse.fillInStackTrace() - println(error) - println("error cause:") - println(error.cause) - println("error cause cause:") - println(error.cause?.cause) - println("error cause cause cause:") - println(error.cause?.cause?.cause) - } +// var getResponse = cacheClient.get(cacheName, key) +// assert(getResponse is GetResponse.Miss) { "expected Miss, got $getResponse" } when (val response = cacheClient.get(cacheName, key)) { - is GetResponse.Error -> fail("expected Miss, got Error: ${response.cause}\n" + - "cause: ${response.cause?.cause}\n" + - "grandcause: ${response.cause?.cause?.cause}") + is GetResponse.Error -> fail("current time: ${System.currentTimeMillis()} expected Miss, got Error: ${response.fillInStackTrace().cause?.cause?.cause}") is GetResponse.Hit -> fail("expected Miss, got Hit.") GetResponse.Miss -> Unit } - assert(getResponse is GetResponse.Miss) { "expected Miss, got $getResponse" } val setResponse = cacheClient.set(cacheName, key, value) assert(setResponse is SetResponse.Success) { "expected Success, got $setResponse" } - getResponse = cacheClient.get(cacheName, key) + var getResponse = cacheClient.get(cacheName, key) assert((getResponse as GetResponse.Hit).value == value) val deleteResponse = cacheClient.delete(cacheName, key)