Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
loser646
TDengine
提交
87cd1cc0
T
TDengine
项目概览
loser646
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
87cd1cc0
编写于
10月 24, 2020
作者:
S
Steven Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed travis build failure caused by crash_gen tool, sorry
上级
22a80a9d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
12 deletion
+12
-12
tests/pytest/crash_gen/crash_gen.py
tests/pytest/crash_gen/crash_gen.py
+3
-3
tests/pytest/crash_gen/service_manager.py
tests/pytest/crash_gen/service_manager.py
+9
-9
未找到文件。
tests/pytest/crash_gen/crash_gen.py
浏览文件 @
87cd1cc0
...
...
@@ -2023,7 +2023,7 @@ class ClientManager:
# print("exec stats: {}".format(self.tc.getExecStats()))
# print("TC failed = {}".format(self.tc.isFailed()))
if
svcMgr
:
# gConfig.auto_start_service:
svcMgr
.
stopTaosService
()
svcMgr
.
stopTaosService
s
()
svcMgr
=
None
# Print exec status, etc., AFTER showing messages from the server
self
.
conclude
()
...
...
@@ -2077,8 +2077,8 @@ class MainExec:
def
runClient
(
self
):
global
gSvcMgr
if
gConfig
.
auto_start_service
:
gSvcMgr
=
self
.
_svcMgr
=
ServiceManager
()
# hack alert
gSvcMgr
.
startTaosService
()
# we start, don't run
gSvcMgr
=
self
.
_svcMgr
=
ServiceManager
(
1
)
# hack alert
gSvcMgr
.
startTaosService
s
()
# we start, don't run
self
.
_clientMgr
=
ClientManager
()
ret
=
None
...
...
tests/pytest/crash_gen/service_manager.py
浏览文件 @
87cd1cc0
...
...
@@ -295,7 +295,7 @@ class TdeSubProcess:
class
ServiceManager
:
PAUSE_BETWEEN_IPC_CHECK
=
1.2
# seconds between checks on STDOUT of sub process
def
__init__
(
self
,
numDnodes
=
1
):
# Otherwise
we run a cluster
def
__init__
(
self
,
numDnodes
):
# >1 when
we run a cluster
Logging
.
info
(
"TDengine Service Manager (TSM) created"
)
self
.
_numDnodes
=
numDnodes
# >1 means we have a cluster
self
.
_lock
=
threading
.
Lock
()
...
...
@@ -306,7 +306,7 @@ class ServiceManager:
self
.
inSigHandler
=
False
# self._status = MainExec.STATUS_RUNNING # set inside
# _startTaosService()
self
.
_runCluster
=
(
numDnodes
>
=
1
)
self
.
_runCluster
=
(
numDnodes
>
1
)
self
.
_tInsts
:
List
[
TdeInstance
]
=
[]
for
i
in
range
(
0
,
numDnodes
):
ti
=
self
.
_createTdeInstance
(
i
)
# construct tInst
...
...
@@ -318,10 +318,10 @@ class ServiceManager:
# self.svcMgrThreads.append(thread)
def
_createTdeInstance
(
self
,
dnIndex
):
#
if not self._runCluster: # single instance
# return ServiceManagerThread(0)
# Create all threads in a cluster
subdir
=
'cluster_dnode_{}'
.
format
(
dnIndex
)
if
not
self
.
_runCluster
:
# single instance
subdir
=
'test'
else
:
# Create all threads in a cluster
subdir
=
'cluster_dnode_{}'
.
format
(
dnIndex
)
fepPort
=
6030
# firstEP Port
port
=
fepPort
+
dnIndex
*
100
return
TdeInstance
(
subdir
,
dnIndex
,
port
,
fepPort
)
...
...
@@ -411,7 +411,7 @@ class ServiceManager:
threads are in "stable" status.
"""
for
ti
in
self
.
_tInsts
:
if
not
ti
.
isStable
():
if
not
ti
.
getStatus
().
isStable
():
return
False
return
True
...
...
@@ -473,7 +473,7 @@ class ServiceManager:
self
.
stopTaosServices
()
# should have started already
def
restart
(
self
):
if
not
self
.
getStatus
().
isStable
():
if
not
self
.
isStable
():
Logging
.
warning
(
"Cannot restart service/cluster, when not stable"
)
return
...
...
@@ -483,7 +483,7 @@ class ServiceManager:
else
:
Logging
.
warning
(
"Service not active when restart requested"
)
self
.
startTaosService
()
self
.
startTaosService
s
()
# self._isRestarting = False
# def isRunning(self):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录