diff options
| -rw-r--r-- | test/test_fieldstat_exporter.py | 6 | ||||
| -rw-r--r-- | test/test_register_and_reset.cpp | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/test/test_fieldstat_exporter.py b/test/test_fieldstat_exporter.py index 232f4b5..4f82f1a 100644 --- a/test/test_fieldstat_exporter.py +++ b/test/test_fieldstat_exporter.py @@ -558,12 +558,6 @@ class TestLocalExporter(unittest.TestCase): self.assertEqual(postadd - peradd, 1) - - def test__append_app_name_to_tags(self): - tags = self.local._LocalExporter__append_app_name_to_tags(self.counter_json_object) - self.assertEqual(tags, "{\"send_log\": \"sum\", \"app_name\": \"-\"}") - - def test__is_tags_matched(self): self.local.match_tags = {} tags = {"action": "deny", "policy_id": 0, "hit_rate": 1.1} diff --git a/test/test_register_and_reset.cpp b/test/test_register_and_reset.cpp index 6013b74..606e1c6 100644 --- a/test/test_register_and_reset.cpp +++ b/test/test_register_and_reset.cpp @@ -269,7 +269,9 @@ TEST(test_register, ensure_recovery_more_faster_spreadsketch) { int cube_id = fieldstat_cube_create(instance, &TEST_SHARED_TAG, 1); int metric_id = fieldstat_register_hll(instance, cube_id, "counter", 6); fieldstat_cube_set_sampling(instance, cube_id, SAMPLING_MODE_TOP_CARDINALITY, cell_num, metric_id); - struct field test_tag_long = TEST_TAG_INT; + char long_string[1000]; + memset(long_string, 'a', 1000); + struct field test_tag_long = {long_string, FIELD_VALUE_INTEGER, {.value_longlong = 0}}; clock_t start = clock(); for (int i = 0; i < cell_num; i++) { |
