File tree 1 file changed +18
-1
lines changed
prj/test/functional/management/src/main/java/management
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1962,7 +1962,24 @@ public void testMembersRunReport()
1962
1962
{
1963
1963
WebTarget target = getBaseTarget ().path (REPORTERS ).path ("1" ).path ("runReport" ).path ("report-node" );
1964
1964
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
+ }
1966
1983
1967
1984
Map mapEntity = new LinkedHashMap ();
1968
1985
Entity entity = Entity .entity (mapEntity , MediaType .APPLICATION_JSON_TYPE );
You can’t perform that action at this time.
0 commit comments