@@ -87,9 +87,9 @@ public void testFailoverChange() throws Exception {
8787 Proxy mockProxy1 = new TestProxy ((proxy , method , args ) -> null );
8888
8989 Class protocol = ApplicationClientProtocol .class ;
90- RMProxy mockRMProxy = mock (RMProxy .class );
91- ConfiguredRMFailoverProxyProvider <RMProxy > fpp =
92- new ConfiguredRMFailoverProxyProvider <RMProxy >();
90+ RMProxy < Proxy > mockRMProxy = mock (RMProxy .class );
91+ ConfiguredRMFailoverProxyProvider <Proxy > fpp =
92+ new ConfiguredRMFailoverProxyProvider <>();
9393
9494 // generate two address with different ports.
9595 // Default port of yarn RM
@@ -104,7 +104,7 @@ public void testFailoverChange() throws Exception {
104104
105105 // Initialize failover proxy provider and get proxy from it.
106106 fpp .init (conf , mockRMProxy , protocol );
107- FailoverProxyProvider .ProxyInfo <RMProxy > actualProxy1 = fpp .getProxy ();
107+ FailoverProxyProvider .ProxyInfo <Proxy > actualProxy1 = fpp .getProxy ();
108108 assertEquals (
109109 "ConfiguredRMFailoverProxyProvider doesn't generate " +
110110 "expected proxy" ,
@@ -139,7 +139,7 @@ public void testFailoverChange() throws Exception {
139139
140140 // Perform Failover and get proxy again from failover proxy provider
141141 fpp .performFailover (actualProxy1 .proxy );
142- FailoverProxyProvider .ProxyInfo < RMProxy > actualProxy2 = fpp .getProxy ();
142+ FailoverProxyProvider .ProxyInfo < Proxy > actualProxy2 = fpp .getProxy ();
143143 assertEquals ("ConfiguredRMFailoverProxyProvider " +
144144 "doesn't generate expected proxy after failover" ,
145145 mockProxy2 , actualProxy2 .proxy );
@@ -167,7 +167,7 @@ public void testFailoverChange() throws Exception {
167167
168168 // Perform Failover and get proxy again from failover proxy provider
169169 fpp .performFailover (actualProxy2 .proxy );
170- FailoverProxyProvider .ProxyInfo < RMProxy > actualProxy3 = fpp .getProxy ();
170+ FailoverProxyProvider .ProxyInfo < Proxy > actualProxy3 = fpp .getProxy ();
171171
172172 // check the proxy is the same as the one we created before.
173173 assertEquals ("ConfiguredRMFailoverProxyProvider " +
@@ -202,11 +202,10 @@ public void testAutoRefreshFailoverChange() throws Exception {
202202 // Create three proxies and mock a RMProxy
203203 Proxy mockProxy1 = new TestProxy ((proxy , method , args ) -> null );
204204 Proxy mockProxy2 = new TestProxy ((proxy , method , args ) -> null );
205- Proxy mockProxy3 = new TestProxy ((proxy , method , args ) -> null );
206205 Class protocol = ApplicationClientProtocol .class ;
207- RMProxy mockRMProxy = mock (RMProxy .class );
208- AutoRefreshRMFailoverProxyProvider <RMProxy > fpp =
209- new AutoRefreshRMFailoverProxyProvider <RMProxy >();
206+ RMProxy < Proxy > mockRMProxy = mock (RMProxy .class );
207+ AutoRefreshRMFailoverProxyProvider <Proxy > fpp =
208+ new AutoRefreshRMFailoverProxyProvider <>();
210209
211210 // generate three address with different ports.
212211 InetSocketAddress mockAdd1 = new InetSocketAddress (RM1_PORT );
@@ -222,7 +221,7 @@ public void testAutoRefreshFailoverChange() throws Exception {
222221
223222 // Initialize failover proxy provider and get proxy from it.
224223 fpp .init (conf , mockRMProxy , protocol );
225- FailoverProxyProvider .ProxyInfo < RMProxy > actualProxy1 = fpp .getProxy ();
224+ FailoverProxyProvider .ProxyInfo < Proxy > actualProxy1 = fpp .getProxy ();
226225 assertEquals (
227226 "AutoRefreshRMFailoverProxyProvider doesn't generate " +
228227 "expected proxy" ,
@@ -257,7 +256,7 @@ public void testAutoRefreshFailoverChange() throws Exception {
257256
258257 // Perform Failover and get proxy again from failover proxy provider
259258 fpp .performFailover (actualProxy1 .proxy );
260- FailoverProxyProvider .ProxyInfo < RMProxy > actualProxy2 = fpp .getProxy ();
259+ FailoverProxyProvider .ProxyInfo < Proxy > actualProxy2 = fpp .getProxy ();
261260 assertEquals ("AutoRefreshRMFailoverProxyProvider " +
262261 "doesn't generate expected proxy after failover" ,
263262 mockProxy2 , actualProxy2 .proxy );
@@ -285,7 +284,7 @@ public void testAutoRefreshFailoverChange() throws Exception {
285284
286285 // Perform Failover and get proxy again from failover proxy provider
287286 fpp .performFailover (actualProxy2 .proxy );
288- FailoverProxyProvider .ProxyInfo < RMProxy > actualProxy3 = fpp .getProxy ();
287+ FailoverProxyProvider .ProxyInfo < Proxy > actualProxy3 = fpp .getProxy ();
289288
290289 // check the proxy is the same as the one we created before.
291290 assertEquals ("ConfiguredRMFailoverProxyProvider " +
0 commit comments