You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by 郑扬勇 <ya...@qq.com> on 2018/07/18 03:01:09 UTC

[DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in Java Chassis

Hi all:
   We had integration with Apollo for support dynamic config in Java Chassis, our CI will pull up apollo docker containers for test (nobodyiam/apollo-quick-start and lijasonvip/apollodb), this step is very slow and easy failed.
   I found that we are only use apollo openapi (https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0) to get configurations from it, code below :
  
 private static RestTemplate rest = new RestTemplate();
 ResponseEntity<String> exchange = rest.exchange(composeAPI(), HttpMethod.GET, entity, String.class);
  
  It is a general http GET request, so I think we only need start up a http server and direct return a default configuration content for this url in order to simulate the apollo server, that is enough.
  
   Any thoughts?
  
 Best Regards & Thanks!
 Yangyong Zheng

答复: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in Java Chassis

Posted by YangYongZheng <34...@qq.com>.
Yes, we only need test integration mechanism, not Apollo itself


Best Regards!
YangYongZheng


-----邮件原件-----
发件人: Yang Bo [mailto:oakyang@gmail.com] 
发送时间: 2018年7月18日 11:13
收件人: dev@servicecomb.apache.org
主题: Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in Java Chassis

For the purpose of testing this is OK. But the real problem here is that apollo is too complex a system for our use case.


On Wed, Jul 18, 2018 at 11:01 AM 郑扬勇 <ya...@qq.com> wrote:

> Hi all:
>    We had integration with Apollo for support dynamic config in Java 
> Chassis, our CI will pull up apollo docker containers for test 
> (nobodyiam/apollo-quick-start and lijasonvip/apollodb), this step is 
> very slow and easy failed.
>    I found that we are only use apollo openapi (
> https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E6%94%BE%E5%B
> 9%B3%E5%8F%B0) to get configurations from it, code below :
>
>  private static RestTemplate rest = new RestTemplate();  
> ResponseEntity<String> exchange = rest.exchange(composeAPI(), 
> HttpMethod.GET, entity, String.class);
>
>   It is a general http GET request, so I think we only need start up a 
> http server and direct return a default configuration content for this 
> url in order to simulate the apollo server, that is enough.
>
>    Any thoughts?
>
>  Best Regards & Thanks!
>  Yangyong Zheng



--
Best Regards,
Yang.




回复: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test inJava Chassis

Posted by bismy <bi...@qq.com>.
+1 for mock this API.


If we can have some good test env, to preinstall third parties and service center to boot up testing is great prefereed.




------------------ 原始邮件 ------------------
发件人: "willem.jiang"<wi...@gmail.com>;
发送时间: 2018年7月19日(星期四) 下午4:47
收件人: "dev"<de...@servicecomb.apache.org>;

主题: Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test inJava Chassis



That's problem of Apollo. We may need to find if there are any other open
source configuration server can do the do too.
From the test point of view, we just need to make sure the API is OK.
I'm +1 for mocking the Apollo API in our test.



Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jul 18, 2018 at 2:36 PM, Yang Bo <oa...@gmail.com> wrote:

> No, What I mean is that Apollo itself is complex. It have multiple
> components and uses eureka for registry/discovery.
> So it will take a long time for booting an Apollo instance for testing,
> which is the problem we are facing in our test cases. The other problem is
> that if used in production, it will require extra man-power to
> maintain/setup this config center.
>
> On Wed, Jul 18, 2018 at 2:10 PM Zen Lin <ze...@gmail.com>
> wrote:
>
> > +1  to using this way to reduce load of integration testing.
> >
> > But I am also interested in what Yangbo mentioned,  "apollo is too
> complex
> > a system for our use case".
> > My doubt is is there any way to reduce this complex, any user guide blog
> > for it?
> >
> > Best Regards,
> > ---
> > Zen Lin
> > zenlintechnofreak@gmail.com
> > Focused on Micro Service and Apache ServiceComb
> >
> >
> > YangYongZheng <34...@qq.com> 于2018年7月18日周三 上午11:24写道:
> >
> > > Yes, we only need test integration mechanism, not Apollo itself
> > >
> > >
> > > Best Regards!
> > > YangYongZheng
> > >
> > >
> > > -----邮件原件-----
> > > 发件人: Yang Bo [mailto:oakyang@gmail.com]
> > > 发送时间: 2018年7月18日 11:13
> > > 收件人: dev@servicecomb.apache.org
> > > 主题: Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in
> > Java
> > > Chassis
> > >
> > > For the purpose of testing this is OK. But the real problem here is
> that
> > > apollo is too complex a system for our use case.
> > >
> > >
> > > On Wed, Jul 18, 2018 at 11:01 AM 郑扬勇 <ya...@qq.com> wrote:
> > >
> > > > Hi all:
> > > >    We had integration with Apollo for support dynamic config in Java
> > > > Chassis, our CI will pull up apollo docker containers for test
> > > > (nobodyiam/apollo-quick-start and lijasonvip/apollodb), this step is
> > > > very slow and easy failed.
> > > >    I found that we are only use apollo openapi (
> > > > https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%
> E6%94%BE%E5%B
> > > > 9%B3%E5%8F%B0) to get configurations from it, code below :
> > > >
> > > >  private static RestTemplate rest = new RestTemplate();
> > > > ResponseEntity<String> exchange = rest.exchange(composeAPI(),
> > > > HttpMethod.GET, entity, String.class);
> > > >
> > > >   It is a general http GET request, so I think we only need start up
> a
> > > > http server and direct return a default configuration content for
> this
> > > > url in order to simulate the apollo server, that is enough.
> > > >
> > > >    Any thoughts?
> > > >
> > > >  Best Regards & Thanks!
> > > >  Yangyong Zheng
> > >
> > >
> > >
> > > --
> > > Best Regards,
> > > Yang.
> > >
> > >
> > >
> > >
> >
>
>
> --
> Best Regards,
> Yang.
>

Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in Java Chassis

Posted by Willem Jiang <wi...@gmail.com>.
That's problem of Apollo. We may need to find if there are any other open
source configuration server can do the do too.
From the test point of view, we just need to make sure the API is OK.
I'm +1 for mocking the Apollo API in our test.



Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jul 18, 2018 at 2:36 PM, Yang Bo <oa...@gmail.com> wrote:

> No, What I mean is that Apollo itself is complex. It have multiple
> components and uses eureka for registry/discovery.
> So it will take a long time for booting an Apollo instance for testing,
> which is the problem we are facing in our test cases. The other problem is
> that if used in production, it will require extra man-power to
> maintain/setup this config center.
>
> On Wed, Jul 18, 2018 at 2:10 PM Zen Lin <ze...@gmail.com>
> wrote:
>
> > +1  to using this way to reduce load of integration testing.
> >
> > But I am also interested in what Yangbo mentioned,  "apollo is too
> complex
> > a system for our use case".
> > My doubt is is there any way to reduce this complex, any user guide blog
> > for it?
> >
> > Best Regards,
> > ---
> > Zen Lin
> > zenlintechnofreak@gmail.com
> > Focused on Micro Service and Apache ServiceComb
> >
> >
> > YangYongZheng <34...@qq.com> 于2018年7月18日周三 上午11:24写道:
> >
> > > Yes, we only need test integration mechanism, not Apollo itself
> > >
> > >
> > > Best Regards!
> > > YangYongZheng
> > >
> > >
> > > -----邮件原件-----
> > > 发件人: Yang Bo [mailto:oakyang@gmail.com]
> > > 发送时间: 2018年7月18日 11:13
> > > 收件人: dev@servicecomb.apache.org
> > > 主题: Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in
> > Java
> > > Chassis
> > >
> > > For the purpose of testing this is OK. But the real problem here is
> that
> > > apollo is too complex a system for our use case.
> > >
> > >
> > > On Wed, Jul 18, 2018 at 11:01 AM 郑扬勇 <ya...@qq.com> wrote:
> > >
> > > > Hi all:
> > > >    We had integration with Apollo for support dynamic config in Java
> > > > Chassis, our CI will pull up apollo docker containers for test
> > > > (nobodyiam/apollo-quick-start and lijasonvip/apollodb), this step is
> > > > very slow and easy failed.
> > > >    I found that we are only use apollo openapi (
> > > > https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%
> E6%94%BE%E5%B
> > > > 9%B3%E5%8F%B0) to get configurations from it, code below :
> > > >
> > > >  private static RestTemplate rest = new RestTemplate();
> > > > ResponseEntity<String> exchange = rest.exchange(composeAPI(),
> > > > HttpMethod.GET, entity, String.class);
> > > >
> > > >   It is a general http GET request, so I think we only need start up
> a
> > > > http server and direct return a default configuration content for
> this
> > > > url in order to simulate the apollo server, that is enough.
> > > >
> > > >    Any thoughts?
> > > >
> > > >  Best Regards & Thanks!
> > > >  Yangyong Zheng
> > >
> > >
> > >
> > > --
> > > Best Regards,
> > > Yang.
> > >
> > >
> > >
> > >
> >
>
>
> --
> Best Regards,
> Yang.
>

Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in Java Chassis

Posted by Yang Bo <oa...@gmail.com>.
No, What I mean is that Apollo itself is complex. It have multiple
components and uses eureka for registry/discovery.
So it will take a long time for booting an Apollo instance for testing,
which is the problem we are facing in our test cases. The other problem is
that if used in production, it will require extra man-power to
maintain/setup this config center.

On Wed, Jul 18, 2018 at 2:10 PM Zen Lin <ze...@gmail.com> wrote:

> +1  to using this way to reduce load of integration testing.
>
> But I am also interested in what Yangbo mentioned,  "apollo is too complex
> a system for our use case".
> My doubt is is there any way to reduce this complex, any user guide blog
> for it?
>
> Best Regards,
> ---
> Zen Lin
> zenlintechnofreak@gmail.com
> Focused on Micro Service and Apache ServiceComb
>
>
> YangYongZheng <34...@qq.com> 于2018年7月18日周三 上午11:24写道:
>
> > Yes, we only need test integration mechanism, not Apollo itself
> >
> >
> > Best Regards!
> > YangYongZheng
> >
> >
> > -----邮件原件-----
> > 发件人: Yang Bo [mailto:oakyang@gmail.com]
> > 发送时间: 2018年7月18日 11:13
> > 收件人: dev@servicecomb.apache.org
> > 主题: Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in
> Java
> > Chassis
> >
> > For the purpose of testing this is OK. But the real problem here is that
> > apollo is too complex a system for our use case.
> >
> >
> > On Wed, Jul 18, 2018 at 11:01 AM 郑扬勇 <ya...@qq.com> wrote:
> >
> > > Hi all:
> > >    We had integration with Apollo for support dynamic config in Java
> > > Chassis, our CI will pull up apollo docker containers for test
> > > (nobodyiam/apollo-quick-start and lijasonvip/apollodb), this step is
> > > very slow and easy failed.
> > >    I found that we are only use apollo openapi (
> > > https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E6%94%BE%E5%B
> > > 9%B3%E5%8F%B0) to get configurations from it, code below :
> > >
> > >  private static RestTemplate rest = new RestTemplate();
> > > ResponseEntity<String> exchange = rest.exchange(composeAPI(),
> > > HttpMethod.GET, entity, String.class);
> > >
> > >   It is a general http GET request, so I think we only need start up a
> > > http server and direct return a default configuration content for this
> > > url in order to simulate the apollo server, that is enough.
> > >
> > >    Any thoughts?
> > >
> > >  Best Regards & Thanks!
> > >  Yangyong Zheng
> >
> >
> >
> > --
> > Best Regards,
> > Yang.
> >
> >
> >
> >
>


-- 
Best Regards,
Yang.

Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in Java Chassis

Posted by Zen Lin <ze...@gmail.com>.
+1  to using this way to reduce load of integration testing.

But I am also interested in what Yangbo mentioned,  "apollo is too complex
a system for our use case".
My doubt is is there any way to reduce this complex, any user guide blog
for it?

Best Regards,
---
Zen Lin
zenlintechnofreak@gmail.com
Focused on Micro Service and Apache ServiceComb


YangYongZheng <34...@qq.com> 于2018年7月18日周三 上午11:24写道:

> Yes, we only need test integration mechanism, not Apollo itself
>
>
> Best Regards!
> YangYongZheng
>
>
> -----邮件原件-----
> 发件人: Yang Bo [mailto:oakyang@gmail.com]
> 发送时间: 2018年7月18日 11:13
> 收件人: dev@servicecomb.apache.org
> 主题: Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in Java
> Chassis
>
> For the purpose of testing this is OK. But the real problem here is that
> apollo is too complex a system for our use case.
>
>
> On Wed, Jul 18, 2018 at 11:01 AM 郑扬勇 <ya...@qq.com> wrote:
>
> > Hi all:
> >    We had integration with Apollo for support dynamic config in Java
> > Chassis, our CI will pull up apollo docker containers for test
> > (nobodyiam/apollo-quick-start and lijasonvip/apollodb), this step is
> > very slow and easy failed.
> >    I found that we are only use apollo openapi (
> > https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E6%94%BE%E5%B
> > 9%B3%E5%8F%B0) to get configurations from it, code below :
> >
> >  private static RestTemplate rest = new RestTemplate();
> > ResponseEntity<String> exchange = rest.exchange(composeAPI(),
> > HttpMethod.GET, entity, String.class);
> >
> >   It is a general http GET request, so I think we only need start up a
> > http server and direct return a default configuration content for this
> > url in order to simulate the apollo server, that is enough.
> >
> >    Any thoughts?
> >
> >  Best Regards & Thanks!
> >  Yangyong Zheng
>
>
>
> --
> Best Regards,
> Yang.
>
>
>
>

Re: [DISCUSS]Simplify Dynamic Config (Apollo) Integration Test in Java Chassis

Posted by Yang Bo <oa...@gmail.com>.
For the purpose of testing this is OK. But the real problem here is that
apollo is too complex a system for our use case.


On Wed, Jul 18, 2018 at 11:01 AM 郑扬勇 <ya...@qq.com> wrote:

> Hi all:
>    We had integration with Apollo for support dynamic config in Java
> Chassis, our CI will pull up apollo docker containers for test
> (nobodyiam/apollo-quick-start and lijasonvip/apollodb), this step is very
> slow and easy failed.
>    I found that we are only use apollo openapi (
> https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0)
> to get configurations from it, code below :
>
>  private static RestTemplate rest = new RestTemplate();
>  ResponseEntity<String> exchange = rest.exchange(composeAPI(),
> HttpMethod.GET, entity, String.class);
>
>   It is a general http GET request, so I think we only need start up a
> http server and direct return a default configuration content for this url
> in order to simulate the apollo server, that is enough.
>
>    Any thoughts?
>
>  Best Regards & Thanks!
>  Yangyong Zheng



-- 
Best Regards,
Yang.