Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
pulsar
提交
c7b91192
pulsar
项目概览
apache
/
pulsar
通知
129
Star
40
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
pulsar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
c7b91192
编写于
10月 04, 2018
作者:
S
Sanjeev Kulkarni
提交者:
GitHub
10月 04, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mock out the settting up k8 client part (#2726)
上级
90c365c1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
3 deletion
+7
-3
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntimeFactory.java
...he/pulsar/functions/runtime/KubernetesRuntimeFactory.java
+2
-1
pulsar-functions/runtime/src/test/java/org/apache/pulsar/functions/runtime/KubernetesRuntimeTest.java
...pache/pulsar/functions/runtime/KubernetesRuntimeTest.java
+5
-2
未找到文件。
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntimeFactory.java
浏览文件 @
c7b91192
...
...
@@ -141,7 +141,8 @@ public class KubernetesRuntimeFactory implements RuntimeFactory {
KubernetesRuntime
.
doChecks
(
functionDetails
);
}
private
void
setupClient
()
throws
Exception
{
@VisibleForTesting
void
setupClient
()
throws
Exception
{
if
(
appsClient
==
null
)
{
if
(
k8Uri
==
null
)
{
log
.
info
(
"k8Uri is null thus going by defaults"
);
...
...
pulsar-functions/runtime/src/test/java/org/apache/pulsar/functions/runtime/KubernetesRuntimeTest.java
浏览文件 @
c7b91192
...
...
@@ -32,6 +32,8 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
static
org
.
powermock
.
api
.
mockito
.
PowerMockito
.
doNothing
;
import
static
org
.
powermock
.
api
.
mockito
.
PowerMockito
.
spy
;
import
static
org
.
testng
.
Assert
.
assertEquals
;
/**
...
...
@@ -67,8 +69,9 @@ public class KubernetesRuntimeTest {
this
.
pulsarAdminUrl
=
"http://localhost:8080"
;
this
.
stateStorageServiceUrl
=
"bk://localhost:4181"
;
this
.
logDirectory
=
"logs/functions"
;
this
.
factory
=
new
KubernetesRuntimeFactory
(
null
,
null
,
null
,
null
,
false
,
null
,
pulsarServiceUrl
,
pulsarAdminUrl
,
stateStorageServiceUrl
,
null
);
this
.
factory
=
spy
(
new
KubernetesRuntimeFactory
(
null
,
null
,
null
,
null
,
false
,
null
,
pulsarServiceUrl
,
pulsarAdminUrl
,
stateStorageServiceUrl
,
null
));
doNothing
().
when
(
this
.
factory
).
setupClient
();
}
@AfterMethod
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录