// since Registry persistence is no longer available @Test( groups = {"wso2.esb"}, description = "Test Priority Executor media type - text/xml", enabled = false) public void priorityExecutorMediaTypeTest() throws Exception { OMElement priorityConfig = AXIOMUtil.stringToOM( "<priority-executor xmlns=\"http://ws.apache.org/ns/synapse\" " + "name=\"" + PRIORITY_EXECUTOR_NAME + "\">" + "<queues>" + "<queue size=\"10\" priority=\"1\" />" + "<queue size=\"5\" priority=\"2\" />" + "</queues>" + "<threads max=\"100\" core=\"20\" " + "keep-alive=\"5\" />" + "</priority-executor>"); priorityMediationAdminClient.addPriorityMediator(PRIORITY_EXECUTOR_NAME, priorityConfig); isPriorityExecutorExist = true; // addEndpoint is a a asynchronous call, it will take some time to write to a registry Thread.sleep(10000); MetadataBean metadata = resourceAdmin.getMetadata( "/_system/config/repository/synapse/default/synapse-executors/" + PRIORITY_EXECUTOR_NAME); Assert.assertEquals( metadata.getMediaType(), "text/xml", "Media Type mismatched for PriorityExecutor"); }
@AfterClass public void destroy() throws RemoteException { if (isPriorityExecutorExist) { priorityMediationAdminClient.remove(PRIORITY_EXECUTOR_NAME); } }