File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
prj/test/functional/management/src/main/java/management Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1962,7 +1962,24 @@ public void testMembersRunReport()
19621962 {
19631963 WebTarget target = getBaseTarget ().path (REPORTERS ).path ("1" ).path ("runReport" ).path ("report-node" );
19641964 Response response = target .request (MediaType .APPLICATION_JSON_TYPE ).get ();
1965- MatcherAssert .assertThat (response .getStatus (), is (Response .Status .OK .getStatusCode ()));
1965+ try
1966+ {
1967+ MatcherAssert .assertThat (response .getStatus (), is (Response .Status .OK .getStatusCode ()));
1968+ }
1969+ catch (Throwable t )
1970+ {
1971+ // occasionally the manage node could be member 2
1972+ if (response .getStatus () == Response .Status .NOT_FOUND .getStatusCode ())
1973+ {
1974+ target = getBaseTarget ().path (REPORTERS ).path ("2" ).path ("runReport" ).path ("report-node" );
1975+ response = target .request (MediaType .APPLICATION_JSON_TYPE ).get ();
1976+ MatcherAssert .assertThat (response .getStatus (), is (Response .Status .OK .getStatusCode ()));
1977+ }
1978+ else
1979+ {
1980+ throw t ;
1981+ }
1982+ }
19661983
19671984 Map mapEntity = new LinkedHashMap ();
19681985 Entity entity = Entity .entity (mapEntity , MediaType .APPLICATION_JSON_TYPE );
You can’t perform that action at this time.
0 commit comments