hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-23460) Add qoption to disable qtests
Date Fri, 15 May 2020 10:47:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-23460?focusedWorklogId=433634&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-433634
]

ASF GitHub Bot logged work on HIVE-23460:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/May/20 10:46
            Start Date: 15/May/20 10:46
    Worklog Time Spent: 10m 
      Work Description: miklosgergely commented on a change in pull request #1018:
URL: https://github.com/apache/hive/pull/1018#discussion_r425719693



##########
File path: itests/util/src/main/java/org/apache/hadoop/hive/ql/qoption/QTestDisabledHandler.java
##########
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.qoption;
+
+import org.apache.hadoop.hive.ql.QTestUtil;
+import org.junit.Assume;
+
+import com.google.common.base.Strings;
+
+/**
+ * QTest disabled directive handler
+ *
+ * Example:
+ * --! qt:disabled:reason
+ *
+ */
+public class QTestDisabledHandler implements QTestOptionHandler {
+
+  private String message;
+
+  @Override
+  public void processArguments(String arguments) {
+    message = arguments;
+    if (Strings.isNullOrEmpty(message)) {
+      throw new RuntimeException("you have to give a reason why it was ignored");
+    }
+  }
+
+  @Override
+  public void beforeTest(QTestUtil qt) throws Exception {
+    Assume.assumeTrue(message, (message == null));

Review comment:
       Instead of throwing an exception, and catching it later I'd suggest to flip a new boolean
"skipped" in QTestUtil, then read it from there. Having a q test disabled is not an exceptional
thing, and considering every AssumptionViolatedException as a sign of skipping can lead to
unexpected situation in case of other assume* commands are failing.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 433634)
    Time Spent: 20m  (was: 10m)

> Add qoption to disable qtests
> -----------------------------
>
>                 Key: HIVE-23460
>                 URL: https://issues.apache.org/jira/browse/HIVE-23460
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-23460.01.patch, HIVE-23460.02.patch, HIVE-23460.02.patch, HIVE-23460.02.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> instead other ways to exclude them... (testconfiguration.properties; CliConfig#excludeQuery)
> {code}
> --! qt:disabled:reason
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message