Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,25 @@
import org.codehaus.groovy.runtime.IOGroovyMethods

suite("test_cumu_compaction_with_delete") {
def tableName = "test_cumu_compaction_with_delete"
def backendId_to_backendIP = [:]
def backendId_to_backendHttpPort = [:]
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);

def set_be_config = { key, value ->
for (String backend_id: backendId_to_backendIP.keySet()) {
def (code, out, err) = update_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), key, value)
logger.info("update config: code=" + code + ", out=" + out + ", err=" + err)
}
}
set_be_config.call("enable_sleep_between_delete_cumu_compaction", "false")

def tableName = "test_cumu_compaction_with_delete1"
def check_cumu_point = { cumu_point ->
def tablets = sql_return_maparray """ show tablets from ${tableName}; """
int cumuPoint = 0
for (def tablet in tablets) {
String tablet_id = tablet.TabletId
(code, out, err) = curl("GET", tablet.CompactionStatus)
def (code, out, err) = curl("GET", tablet.CompactionStatus)
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())
Expand Down Expand Up @@ -56,7 +68,7 @@ suite("test_cumu_compaction_with_delete") {
if(check_cumu_point(100)){
break;
}
Thread.sleep(1000)
Thread.sleep(10000)
}
def time_diff = System.currentTimeMillis() - now
logger.info("time_diff:" + time_diff)
Expand All @@ -70,19 +82,9 @@ suite("test_cumu_compaction_with_delete") {
try_sql("DROP TABLE IF EXISTS ${tableName} FORCE")
}

def backendId_to_backendIP = [:]
def backendId_to_backendHttpPort = [:]
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);

def set_be_config = { key, value ->
for (String backend_id: backendId_to_backendIP.keySet()) {
def (code, out, err) = update_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), key, value)
logger.info("update config: code=" + code + ", out=" + out + ", err=" + err)
}
}

try {
set_be_config.call("enable_sleep_between_delete_cumu_compaction", "true")
tableName = "test_cumu_compaction_with_delete2"
sql """ DROP TABLE IF EXISTS ${tableName} """
sql """
CREATE TABLE ${tableName} (
Expand All @@ -105,7 +107,7 @@ suite("test_cumu_compaction_with_delete") {
if(check_cumu_point(100)){
break;
}
Thread.sleep(1000)
Thread.sleep(10000)
}
def time_diff = System.currentTimeMillis() - now
logger.info("time_diff:" + time_diff)
Expand Down