Thanks to visit codestin.com
Credit goes to github.com

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
1 change: 0 additions & 1 deletion python/parallel_test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from shutil import copyfile

import infinity
import pytest
Expand Down
12 changes: 5 additions & 7 deletions python/test_http_api/test_database.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import logging
import os
import sys
import pytest
import threading
from httpapibase import HttpTest
Expand Down Expand Up @@ -70,7 +68,7 @@ def test_http_create_database_invalid_name(self):
})
self.clear_http_database()

def test_http_create_drop_show_1K_databases(self):
def test_http_create_drop_show_100_databases(self):
'''
create 1K dbs,show these dbs,drop these dbs
'''
Expand Down Expand Up @@ -100,15 +98,15 @@ def test_http_create_drop_show_1K_databases(self):
self.drop_database('test_http_db_name' + str(i))
self.clear_http_database()

@pytest.mark.skipif(condition=os.getenv("RUNSLOWTEST")!="1", reason="Cost too much times")
def test_http_create_drop_show_100K_databases(self):
@pytest.mark.slow
def test_http_create_drop_show_10K_databases(self):
"""
create 100K dbs, show these dbs, drop these dbs
create 10K dbs, show these dbs, drop these dbs
"""
self.clear_http_database()

# create databases
db_count = 100000
db_count = 10000
for i in range(db_count):
# print('create test_http_db_name' + str(i))
self.drop_database('test_http_db_name' + str(i))
Expand Down
12 changes: 0 additions & 12 deletions python/test_http_api/test_delete.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
import pytest
import time
from httpapibase import HttpTest
Expand All @@ -7,9 +6,7 @@

class TestDelete(HttpTest):
def test_http_version(self):

return
# pass

def test_http_delete(self):
db_name = "default_db"
Expand Down Expand Up @@ -49,8 +46,6 @@ def test_http_delete(self):
self.drop_table(db_name, table_name)
return

# PASS

def test_http_delete_empty_table(self):
db_name = "default_db"
table_name = "test_http_test_delete_empty_table"
Expand All @@ -72,7 +67,6 @@ def test_http_delete_empty_table(self):
})
self.drop_table(db_name, table_name)
return
# pass

def test_http_delete_non_existent_table(self):
db_name = "default_db"
Expand All @@ -84,7 +78,6 @@ def test_http_delete_non_existent_table(self):
"error_code": 3063,
})
return
# PASS

def test_http_delete_table_all_row_met_the_condition(self):
db_name = "default_db"
Expand Down Expand Up @@ -115,7 +108,6 @@ def test_http_delete_table_all_row_met_the_condition(self):
i += 1
self.drop_table(db_name, table_name)
return
# PASS

def test_http_delete_table_no_rows_met_condition(self):
db_name = "default_db"
Expand Down Expand Up @@ -146,7 +138,6 @@ def test_http_delete_table_no_rows_met_condition(self):
self.drop_table(db_name, table_name + str(i))
return

# PASS
def test_http_delete_table_with_one_block(self):
db_name = "default_db"
table_name = "test_http_test_delete_table_with_one_block"
Expand All @@ -158,7 +149,6 @@ def test_http_delete_table_with_one_block(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_delete_table_with_one_segment(self):
db_name = "default_db"
table_name = "test_http_test_delete_table_with_one_segment"
Expand All @@ -171,7 +161,6 @@ def test_http_delete_table_with_one_segment(self):
self.delete(db_name, table_name, "c1 = " + str(i))
self.drop_table(db_name, table_name)
return
# PASS

def test_http_select_before_after_delete(self):
db_name = "default_db"
Expand All @@ -185,7 +174,6 @@ def test_http_select_before_after_delete(self):
self.delete(db_name, table_name, "c1=1")
self.drop_table(db_name, table_name)
return
# PASS

def test_http_delete_insert_data(self):
db_name = "default_db"
Expand Down
22 changes: 2 additions & 20 deletions python/test_http_api/test_import.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import os
import pytest
from httpapibase import HttpTest
from common.common_values import *
import httputils
import pytest


class TestImport(HttpTest):
def test_http_version(self):
return

# PASS
def test_http_import(self):
httputils.check_data(TEST_TMP_DIR)

Expand Down Expand Up @@ -71,7 +70,6 @@ def test_http_import(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_different_file_format_data(self):
httputils.check_data(TEST_TMP_DIR)
db_name = "default_db"
Expand Down Expand Up @@ -128,7 +126,6 @@ def test_http_import_different_file_format_data(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_empty_file_fvecs(self):
httputils.check_data(TEST_TMP_DIR)
db_name = "default_db"
Expand All @@ -155,7 +152,6 @@ def test_http_import_empty_file_fvecs(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_empty_file_csv(self):
httputils.check_data(TEST_TMP_DIR)
db_name = "default_db"
Expand Down Expand Up @@ -186,7 +182,6 @@ def test_http_import_empty_file_csv(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_empty_file_jsonl(self):
httputils.check_data(TEST_TMP_DIR)
db_name = "default_db"
Expand Down Expand Up @@ -247,7 +242,6 @@ def test_http_import_empty_file_json(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_format_unrecognized_data(self):
httputils.check_data(TEST_TMP_DIR)
file_format = ["txt"]
Expand Down Expand Up @@ -282,7 +276,6 @@ def test_http_import_format_unrecognized_data(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_csv_with_different_delimiter(self):
httputils.check_data(TEST_TMP_DIR)

Expand All @@ -307,7 +300,6 @@ def test_http_csv_with_different_delimiter(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_csv_with_different_delimiter_more_than_one_character(self):
httputils.check_data(TEST_TMP_DIR)
db_name = "default_db"
Expand All @@ -330,7 +322,6 @@ def test_http_csv_with_different_delimiter_more_than_one_character(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_csv_with_headers(self):
httputils.check_data(TEST_TMP_DIR)
file_name = "csv/embedding_int_dim3.csv"
Expand Down Expand Up @@ -367,7 +358,6 @@ def test_http_import_csv_with_headers(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_fvecs_table_with_more_columns(self):
httputils.check_data(TEST_TMP_DIR)
file_name = "http_test.fvecs"
Expand Down Expand Up @@ -407,7 +397,6 @@ def test_http_import_fvecs_table_with_more_columns(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_embedding_with_not_match_definition(self):
httputils.check_data(TEST_TMP_DIR)
types = [{"name": "c2", "type": "vector", "dimension": 3, "element_type": "integer"},
Expand Down Expand Up @@ -443,7 +432,6 @@ def test_http_import_embedding_with_not_match_definition(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_embedding_with_dimension_unmatch(self):
httputils.check_data(TEST_TMP_DIR)
file_name = "embedding_int_dim3.csv"
Expand Down Expand Up @@ -479,7 +467,6 @@ def test_http_import_embedding_with_dimension_unmatch(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_embedding_with_unmatched_elem_type(self):
httputils.check_data(TEST_TMP_DIR)
types = [{"name": "c2", "type": "vector", "dimension": 3, "element_type": "bool"},
Expand All @@ -503,7 +490,6 @@ def test_http_import_embedding_with_unmatched_elem_type(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_varchar_with_not_match_definition(self):
httputils.check_data(TEST_TMP_DIR)
file_name = "pysdk_test_varchar.csv"
Expand All @@ -526,7 +512,6 @@ def test_http_import_varchar_with_not_match_definition(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_10000_columns(self):
httputils.check_data(TEST_TMP_DIR)
file_name = "http_test_big_int.csv"
Expand All @@ -551,7 +536,6 @@ def test_http_import_10000_columns(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_table_with_not_matched_columns(self):
httputils.check_data(TEST_TMP_DIR)
httputils.copy_data("pysdk_test_commas.csv")
Expand All @@ -578,7 +562,6 @@ def test_http_table_with_not_matched_columns(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_with_different_size(self):
httputils.check_data(TEST_TMP_DIR)
db_name = "default_db"
Expand All @@ -604,7 +587,7 @@ def test_http_import_with_different_size(self):
self.drop_table(db_name, table_name)
return

# @pytest.mark.skip(reason="cost too much time")
@pytest.mark.slow
def test_http_import_exceeding_rows(self):
httputils.check_data(TEST_TMP_DIR)
file_name = "http_test_big_varchar_rows.csv"
Expand All @@ -628,7 +611,6 @@ def test_http_import_exceeding_rows(self):
self.drop_table(db_name, table_name)
return

# PASS
def test_http_import_exceeding_columns(self):
httputils.check_data(TEST_TMP_DIR)
file_name = "http_test_big_columns.csv"
Expand Down
Loading