ayushtkn commented on code in PR #4722:
URL: https://github.com/apache/hive/pull/4722#discussion_r1336861251


##########
jdbc-handler/src/test/java/org/apache/hive/storage/jdbc/TestJdbcInputFormat.java:
##########
@@ -45,20 +45,33 @@
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.Mockito.mockStatic;
 import static org.mockito.Mockito.when;
 
-@RunWith(PowerMockRunner.class)
-@PrepareForTest(DatabaseAccessorFactory.class)
+@RunWith(MockitoJUnitRunner.class)
 public class TestJdbcInputFormat {
 
   @Mock
   private DatabaseAccessor mockDatabaseAccessor;
+  private MockedStatic<DatabaseAccessorFactory> hiveDatabaseAccessorFactory;
+
+  @Before
+  public void setup() throws Exception{
+
+    hiveDatabaseAccessorFactory = mockStatic(DatabaseAccessorFactory.class);
+    hiveDatabaseAccessorFactory.when(() -> 
DatabaseAccessorFactory.getAccessor(any(Configuration.class))).thenReturn(mockDatabaseAccessor);

Review Comment:
   line length allowed is 120 only
   https://github.com/apache/hive/blob/master/checkstyle/checkstyle.xml#L160



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to