Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
JaySon-Huang committed Nov 27, 2023
1 parent 3fab71e commit 98e9d86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions dbms/src/TiDB/Schema/SchemaBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ void SchemaBuilder<Getter, NameMapper>::applyExchangeTablePartition(const Schema
template <typename Getter, typename NameMapper>
void SchemaBuilder<Getter, NameMapper>::applyDiff(const SchemaDiff & diff)
{
LOG_TRACE(log, "applyDiff accept type={}", magic_enum::enum_name(diff.type));
switch (diff.type)
{
case SchemaActionType::CreateSchema:
Expand Down
9 changes: 5 additions & 4 deletions tests/run-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import re
import sys
import time
import datetime

if sys.version_info.major == 2:
# print('running with py2: {}.{}.{}'.format(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))
Expand Down Expand Up @@ -282,7 +283,7 @@ def on_line(self, line, line_number):
if line.endswith(NO_UNESCAPE_SUFFIX):
unescape_flag = False
line = line[:-len(NO_UNESCAPE_SUFFIX)]
if verbose: print('running', line)
if verbose: print('{} running {}'.format(datetime.datetime.now().strftime('%H:%M:%S.%f'), line))
if self.outputs != None and ((not self.is_mysql and not matched(self.outputs, self.matches, self.fuzz)) or (
self.is_mysql and not MySQLCompare.matched(self.outputs, self.matches))):
return False
Expand All @@ -294,7 +295,7 @@ def on_line(self, line, line_number):
self.outputs = [x.strip() for x in self.outputs if len(x.strip()) != 0]
self.matches = []
elif line.startswith(CURL_TIDB_STATUS_PREFIX):
if verbose: print('running', line)
if verbose: print('{} running {}'.format(datetime.datetime.now().strftime('%H:%M:%S.%f'), line))
if self.outputs != None and ((not self.is_mysql and not matched(self.outputs, self.matches, self.fuzz)) or (
self.is_mysql and not MySQLCompare.matched(self.outputs, self.matches))):
return False
Expand All @@ -306,7 +307,7 @@ def on_line(self, line, line_number):
return False
self.matches = []
elif line.startswith(CMD_PREFIX) or line.startswith(CMD_PREFIX_ALTER):
if verbose: print('running', line)
if verbose: print('{} running {}'.format(datetime.datetime.now().strftime('%H:%M:%S.%f'), line))
if self.outputs != None and ((not self.is_mysql and not matched(self.outputs, self.matches, self.fuzz)) or (
self.is_mysql and not MySQLCompare.matched(self.outputs, self.matches))):
return False
Expand All @@ -320,7 +321,7 @@ def on_line(self, line, line_number):
self.outputs = [x for x in self.outputs if x.find(ignored_output) < 0]
self.matches = []
elif line.startswith(CMD_PREFIX_FUNC):
if verbose: print('running', line)
if verbose: print('{} running {}'.format(datetime.datetime.now().strftime('%H:%M:%S.%f'), line))
if self.outputs != None and ((not self.is_mysql and not matched(self.outputs, self.matches, self.fuzz)) or (
self.is_mysql and not MySQLCompare.matched(self.outputs, self.matches))):
return False
Expand Down

0 comments on commit 98e9d86

Please sign in to comment.