Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
月轩居士
SkyWalking
提交
f1fa7386
S
SkyWalking
项目概览
月轩居士
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f1fa7386
编写于
10月 17, 2019
作者:
D
Daming
提交者:
wu-sheng
10月 17, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make plugin test more stable on docker-compose (#3642)
上级
6af2c082
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
25 addition
and
29 deletion
+25
-29
test/plugin/containers/jvm-container/docker/run.sh
test/plugin/containers/jvm-container/docker/run.sh
+3
-5
test/plugin/containers/tomcat-container/docker/run.sh
test/plugin/containers/tomcat-container/docker/run.sh
+1
-1
test/plugin/scenarios/solrj-7.x-scenario/config/expectedData.yaml
...gin/scenarios/solrj-7.x-scenario/config/expectedData.yaml
+3
-21
test/plugin/scenarios/solrj-7.x-scenario/configuration.yml
test/plugin/scenarios/solrj-7.x-scenario/configuration.yml
+3
-1
test/plugin/scenarios/solrj-7.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/solrj/controller/CaseController.java
...walking/apm/testcase/solrj/controller/CaseController.java
+15
-1
未找到文件。
test/plugin/containers/jvm-container/docker/run.sh
浏览文件 @
f1fa7386
...
...
@@ -33,7 +33,7 @@ function healthCheck() {
HEALTH_CHECK_URL
=
$1
STATUS_CODE
=
"-1"
for
((
i
=
1
;
i<
=
3
0
;
i++
))
;
for
((
i
=
1
;
i<
=
15
0
;
i++
))
;
do
STATUS_CODE
=
"
$(
curl
-Is
${
HEALTH_CHECK_URL
}
|
head
-n
1
)
"
if
[[
$STATUS_CODE
==
*
"200"
*
]]
;
then
...
...
@@ -72,10 +72,8 @@ export agent_opts="-javaagent:${SCENARIO_HOME}/agent/skywalking-agent.jar
-Dskywalking.logging.dir=/usr/local/skywalking/scenario/logs
-Xms256m -Xmx256m
${
agent_opts
}
"
exec
/var/run/
${
SCENARIO_NAME
}
/
${
SCENARIO_START_SCRIPT
}
1>/dev/null &
for
HEALTH_CHECK_URL
in
${
SCENARIO_HEALTH_CHECK_URL
}
;
do
healthCheck
$HEALTH_CHECK_URL
done
healthCheck
${
SCENARIO_HEALTH_CHECK_URL
}
echo
"To visit entry service"
curl
-s
${
SCENARIO_ENTRY_SERVICE
}
...
...
test/plugin/containers/tomcat-container/docker/run.sh
浏览文件 @
f1fa7386
...
...
@@ -30,7 +30,7 @@ function exitAndClean() {
function
healthCheck
()
{
HEALTH_CHECK_URL
=
$1
for
((
i
=
1
;
i<
=
3
0
;
i++
))
;
for
((
i
=
1
;
i<
=
15
0
;
i++
))
;
do
STATUS_CODE
=
"
$(
curl
-Is
${
HEALTH_CHECK_URL
}
|
head
-n
1
)
"
if
[[
$STATUS_CODE
==
*
"200"
*
]]
;
then
...
...
test/plugin/scenarios/solrj-7.x-scenario/config/expectedData.yaml
浏览文件 @
f1fa7386
...
...
@@ -21,30 +21,12 @@ registryItems:
operationNames
:
-
solrj-7.x-scenario
:
[
/solrj-scenario/case/solrj
,
solrJ/mycore/update/COMMIT
,
solrJ/mycore/update/DELETE_BY_IDS
,
solrJ/mycore/select
,
solrJ/mycore/update/DELETE_BY_QUERY
,
solrJ/mycore/get
,
/solrj-scenario/case/healthcheck
,
solrJ/mycore/update/OPTIMIZE
,
solrJ/mycore/update/ADD
]
solrJ/mycore/update/OPTIMIZE
,
solrJ/mycore/update/ADD
]
heartbeat
:
[]
segmentItems
:
-
applicationCode
:
solrj-7.x-scenario
segmentSize
:
2
segmentSize
:
gt
1
segments
:
-
segmentId
:
not
null
spans
:
-
operationName
:
/solrj-scenario/case/healthcheck
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
gt
0
endTime
:
gt
0
componentId
:
1
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/solrj-scenario/case/healthcheck'
}
-
{
key
:
http.method
,
value
:
HEAD
}
-
segmentId
:
not
null
spans
:
-
operationName
:
solrJ/mycore/update/ADD
...
...
test/plugin/scenarios/solrj-7.x-scenario/configuration.yml
浏览文件 @
f1fa7386
...
...
@@ -15,11 +15,13 @@
type
:
jvm
entryService
:
http://localhost:8080/solrj-scenario/case/solrj
healthCheck
:
"
http://solr-server:8983/solr/mycore/select
http://localhost:8080/solrj-scenario/case/healthcheck"
healthCheck
:
http://localhost:8080/solrj-scenario/case/healthcheck
startScript
:
./bin/startup.sh
framework
:
solrj
environment
:
-
SOLR_SERVER=solr-server:8983
depends_on
:
-
solr-server
dependencies
:
solr-server
:
image
:
solr:${CASE_SERVER_IMAGE_VERSION}
...
...
test/plugin/scenarios/solrj-7.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/solrj/controller/CaseController.java
浏览文件 @
f1fa7386
...
...
@@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
@RestController
@RequestMapping
(
"/solrj-scenario/case"
)
...
...
@@ -48,8 +49,21 @@ public class CaseController {
@GetMapping
(
"/healthcheck"
)
public
String
healthcheck
()
throws
Exception
{
ModifiableSolrParams
params
=
new
ModifiableSolrParams
();
params
.
set
(
CommonParams
.
Q
,
"*:*"
);
params
.
set
(
CommonParams
.
OMIT_HEADER
,
true
);
HttpSolrClient
client
=
getClient
();
try
{
QueryResponse
response
=
client
.
query
(
collection
,
params
);
if
(
response
.
getStatus
()
==
0
)
{
return
"Success"
;
}
throw
new
Exception
(
response
.
toString
());
}
catch
(
Exception
e
)
{
throw
e
;
}
}
@GetMapping
(
"/solrj"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录