You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/04/10 15:36:21 UTC

[GitHub] [incubator-dolphinscheduler] dailidong commented on issue #2397: api server exception management and code optimization (#397)

dailidong commented on issue #2397: api server exception management and code optimization (#397)
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2397#issuecomment-612083619
 
 
   good job, the code becomes more concise. I think you can refer the QueueControllerTest , about Exception Test , refer the following code:
    try {
           mockMvc.perform(post("/api/athlete").contentType(contentType).
                   content(TestUtil.convertObjectToJsonBytes(wAthleteFTP)))
                   .andExpect(status().isInternalServerError())
                   .andExpect(content().string("..."))
                   .andDo(print());
       } catch (Exception e){
           //sink it
       }
   
   I want to say I'm not very familar with MockMvc, you can contact me by mail( lidongdai@apache.org )  or    add my wechat(510570367),  when added , please tell me your github id is  hgaol

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services