anmolanmol1234 commented on code in PR #6847:
URL: https://github.com/apache/hadoop/pull/6847#discussion_r1849619028
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsReadFooterMetrics.java:
##########
@@ -47,6 +52,20 @@
public class ITestAbfsReadFooterMetrics extends AbstractAbfsScaleTest {
public ITestAbfsReadFooterMetrics() throws Exception {
+ checkPrerequisites();
+ }
+
+ private void checkPrerequisites(){
+ checkIfConfigIsSet(FS_AZURE_METRIC_ACCOUNT_NAME);
+ checkIfConfigIsSet(FS_AZURE_METRIC_ACCOUNT_KEY);
+ checkIfConfigIsSet(FS_AZURE_METRIC_URI);
+ }
+
+ private void checkIfConfigIsSet(String configKey){
+ AbfsConfiguration conf = getConfiguration();
+ String value = conf.get(configKey);
+ Assume.assumeTrue(configKey + " config is mandatory for the test to run",
Review Comment:
We want to skip the tests if the config is not present hence
Assume.assumeTrue
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsRestOperation.java:
##########
@@ -39,6 +44,19 @@ public class TestAbfsRestOperation extends
public TestAbfsRestOperation() throws Exception {
}
+ private void checkPrerequisites() throws Exception {
+ checkIfConfigIsSet(FS_AZURE_METRIC_ACCOUNT_NAME);
+ checkIfConfigIsSet(FS_AZURE_METRIC_ACCOUNT_KEY);
+ checkIfConfigIsSet(FS_AZURE_METRIC_URI);
+ }
+
+ private void checkIfConfigIsSet(String configKey){
+ AbfsConfiguration conf = getConfiguration();
+ String value = conf.get(configKey);
+ Assume.assumeTrue(configKey + " config is mandatory for the test to run",
Review Comment:
We want to skip the tests if the config is not present hence
Assume.assumeTrue
--
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]