3 Replies Latest reply on Oct 9, 2014 11:11 PM by Tung Tran

    Couldn't set port to test http binding with SwitchYard

    Tung Tran Newbie

      Hi all,

      I have a test case to test the http binding service. But it's not able to set the port in order to deploy the service under test.

      I use one method comes with annotation @BeforeDeploy to set up that

       @BeforeDeploy
          public void setProperties() {
              System.setProperty("org.switchyard.component.http.standalone.port", "8081");
          }
      

       

      And the base URL to connect to the service under test:

      private static final String BASE_URL = "http://localhost:8081/jfsw-engine/engine";
      

       

      The test method

      private HTTPMixIn http;
          @Test
          public void quote_PUT() throws Exception {
              String response = http.sendString(BASE_URL + "/quote", "", HTTPMixIn.HTTP_GET);
              Assert.assertEquals("0.0", response);
          }
      

       

      But it doesn't work. The connection to the service was refused.

      Thanks,