This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 9040963dfaf (merge-cloud) Fix file cache regression cases (#33441) 9040963dfaf is described below commit 9040963dfaf1aac4cea9aaab8bd0b833aedf4bac Author: Lightman <31928846+lchangli...@users.noreply.github.com> AuthorDate: Wed Apr 10 18:58:54 2024 +0800 (merge-cloud) Fix file cache regression cases (#33441) --- .../cloud_p0/cache/http/test_clear_cache.groovy | 42 ++------------- .../cache/http/test_clear_cache_async.groovy | 59 +++++++++++----------- .../suites/cloud_p0/cache/ttl/alter_ttl_1.groovy | 4 +- .../suites/cloud_p0/cache/ttl/alter_ttl_2.groovy | 5 +- 4 files changed, 36 insertions(+), 74 deletions(-) diff --git a/regression-test/suites/cloud_p0/cache/http/test_clear_cache.groovy b/regression-test/suites/cloud_p0/cache/http/test_clear_cache.groovy index 963705577c4..0563892cf31 100644 --- a/regression-test/suites/cloud_p0/cache/http/test_clear_cache.groovy +++ b/regression-test/suites/cloud_p0/cache/http/test_clear_cache.groovy @@ -92,48 +92,14 @@ suite("test_clear_cache") { } } - clearFileCache.call() { - respCode, body -> {} - } - load_customer_once("customer_ttl") - sleep(30000) // 30s - - getMetricsMethod.call() { - respCode, body -> - assertEquals("${respCode}".toString(), "200") - String out = "${body}".toString() - def strs = out.split('\n') - Boolean flag1 = false; - Boolean flag2 = false; - long ttl_cache_size = 0; - long total_cache_size = 0; - for (String line in strs) { - if (flag1 && flag2) break; - if (line.contains("ttl_cache_size")) { - if (line.startsWith("#")) { - continue - } - def i = line.indexOf(' ') - ttl_cache_size = line.substring(i).toLong() - flag1 = true - } - if (line.contains("file_cache_cache_size")) { - if (line.startsWith("#")) { - continue - } - def i = line.indexOf(' ') - total_cache_size = line.substring(i).toLong() - flag2 = true - } - } - assertTrue(flag1 && flag2) - assertEquals(ttl_cache_size, total_cache_size) - } + load_customer_once("customer") clearFileCache.call() { respCode, body -> {} } + sql new File("""${context.file.parent}/../ddl/customer_ttl_delete.sql""").text + sql new File("""${context.file.parent}/../ddl/customer_delete.sql""").text sleep(30000) getMetricsMethod.call() { respCode, body -> @@ -156,6 +122,4 @@ suite("test_clear_cache") { } assertTrue(flag) } - - sql new File("""${context.file.parent}/../ddl/customer_ttl_delete.sql""").text } diff --git a/regression-test/suites/cloud_p0/cache/http/test_clear_cache_async.groovy b/regression-test/suites/cloud_p0/cache/http/test_clear_cache_async.groovy index 4ac6427de82..4bcd84f5edf 100644 --- a/regression-test/suites/cloud_p0/cache/http/test_clear_cache_async.groovy +++ b/regression-test/suites/cloud_p0/cache/http/test_clear_cache_async.groovy @@ -96,36 +96,35 @@ suite("test_clear_cache_async") { clearFileCache.call() { respCode, body -> {} } - // sleep(30000) // 30s - // load_customer_once("customer_ttl") - // load_customer_once("customer") - // clearFileCache.call() { - // respCode, body -> {} - // } - // sleep(30000) - // getMetricsMethod.call() { - // respCode, body -> - // assertEquals("${respCode}".toString(), "200") - // String out = "${body}".toString() - // def strs = out.split('\n') - // Boolean flag = false; - // long total_cache_size = 0; - // for (String line in strs) { - // if (line.contains("file_cache_cache_size")) { - // if (line.startsWith("#")) { - // continue - // } - // def i = line.indexOf(' ') - // total_cache_size = line.substring(i).toLong() - // assertEquals(0, total_cache_size) - // flag = true - // break - // } - // } - // assertTrue(flag) - // } + load_customer_once("customer_ttl") + load_customer_once("customer") + sql new File("""${context.file.parent}/../ddl/customer_ttl_delete.sql""").text + sql new File("""${context.file.parent}/../ddl/customer_delete.sql""").text - // sql new File("""${context.file.parent}/../ddl/customer_ttl_delete.sql""").text - // sql new File("""${context.file.parent}/../ddl/customer_delete.sql""").text + clearFileCache.call() { + respCode, body -> {} + } + sleep(30000) + getMetricsMethod.call() { + respCode, body -> + assertEquals("${respCode}".toString(), "200") + String out = "${body}".toString() + def strs = out.split('\n') + Boolean flag = false; + long total_cache_size = 0; + for (String line in strs) { + if (line.contains("file_cache_cache_size")) { + if (line.startsWith("#")) { + continue + } + def i = line.indexOf(' ') + total_cache_size = line.substring(i).toLong() + assertEquals(0, total_cache_size) + flag = true + break + } + } + assertTrue(flag) + } } diff --git a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_1.groovy b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_1.groovy index 26c03e6c3bd..886529c2a30 100644 --- a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_1.groovy +++ b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_1.groovy @@ -118,7 +118,7 @@ suite("alter_ttl_1") { } assertTrue(flag1) } - sql """ ALTER TABLE customer_ttl SET ("file_cache_ttl_seconds"="120") """ + sql """ ALTER TABLE customer_ttl SET ("file_cache_ttl_seconds"="140") """ sleep(80000) getMetricsMethod.call() { respCode, body -> @@ -140,7 +140,7 @@ suite("alter_ttl_1") { assertTrue(flag1) } // wait for ttl timeout - sleep(30000) + sleep(50000) getMetricsMethod.call() { respCode, body -> assertEquals("${respCode}".toString(), "200") diff --git a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_2.groovy b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_2.groovy index c10d44bf7d8..b7140087c04 100644 --- a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_2.groovy +++ b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_2.groovy @@ -140,16 +140,15 @@ suite("alter_ttl_2") { assertTrue(flag1) } // wait for ttl timeout - sleep(30000) + sleep(40000) getMetricsMethod.call() { respCode, body -> assertEquals("${respCode}".toString(), "200") String out = "${body}".toString() def strs = out.split('\n') Boolean flag1 = false; - Boolean flag2 = false; for (String line in strs) { - if (flag1 && flag2) break; + if (flag1) break; if (line.contains("ttl_cache_size")) { if (line.startsWith("#")) { continue --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org