Return-Path: X-Original-To: apmail-asterixdb-commits-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CCA9419129 for ; Tue, 15 Mar 2016 23:36:20 +0000 (UTC) Received: (qmail 47351 invoked by uid 500); 15 Mar 2016 23:36:20 -0000 Delivered-To: apmail-asterixdb-commits-archive@asterixdb.apache.org Received: (qmail 47316 invoked by uid 500); 15 Mar 2016 23:36:20 -0000 Mailing-List: contact commits-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list commits@asterixdb.incubator.apache.org Received: (qmail 47307 invoked by uid 99); 15 Mar 2016 23:36:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2016 23:36:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B83AAC0316 for ; Tue, 15 Mar 2016 23:36:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id SOYSNUrgjASB for ; Tue, 15 Mar 2016 23:36:18 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 31C1F5F572 for ; Tue, 15 Mar 2016 23:36:18 +0000 (UTC) Received: (qmail 47236 invoked by uid 99); 15 Mar 2016 23:36:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2016 23:36:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9B69CDFCDD; Tue, 15 Mar 2016 23:36:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: amoudi@apache.org To: commits@asterixdb.incubator.apache.org Date: Tue, 15 Mar 2016 23:36:19 -0000 Message-Id: <9fe40f37e8fa4c33b1ff466b317f254f@git.apache.org> In-Reply-To: <1ee1d9a3b21342a6a88154660fd1b417@git.apache.org> References: <1ee1d9a3b21342a6a88154660fd1b417@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/19] incubator-asterixdb git commit: Support Change Feeds and Ingestion of Records with MetaData http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d3338f66/asterix-installer/src/test/java/org/apache/asterix/installer/test/AbstractExecutionIT.java ---------------------------------------------------------------------- diff --git a/asterix-installer/src/test/java/org/apache/asterix/installer/test/AbstractExecutionIT.java b/asterix-installer/src/test/java/org/apache/asterix/installer/test/AbstractExecutionIT.java index 5df074b..a6d544e 100644 --- a/asterix-installer/src/test/java/org/apache/asterix/installer/test/AbstractExecutionIT.java +++ b/asterix-installer/src/test/java/org/apache/asterix/installer/test/AbstractExecutionIT.java @@ -17,6 +17,7 @@ package org.apache.asterix.installer.test; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; @@ -25,6 +26,8 @@ import org.apache.asterix.external.util.IdentitiyResolverFactory; import org.apache.asterix.test.aql.TestExecutor; import org.apache.asterix.test.runtime.HDFSCluster; import org.apache.asterix.testframework.context.TestCaseContext; +import org.apache.asterix.testframework.context.TestFileContext; +import org.apache.asterix.testframework.xml.TestCase.CompilationUnit; import org.apache.commons.lang3.StringUtils; import org.codehaus.plexus.util.FileUtils; import org.junit.AfterClass; @@ -50,6 +53,8 @@ public abstract class AbstractExecutionIT { protected final static TestExecutor testExecutor = new TestExecutor(); + private static final String EXTERNAL_LIBRARY_TEST_GROUP = "lib"; + @BeforeClass public static void setUp() throws Exception { System.out.println("Starting setup"); @@ -85,7 +90,7 @@ public abstract class AbstractExecutionIT { public static void tearDown() throws Exception { File outdir = new File(PATH_ACTUAL); File[] files = outdir.listFiles(); - if (files == null || files.length == 0) { + if ((files == null) || (files.length == 0)) { outdir.delete(); } AsterixLifecycleIT.tearDown(); @@ -111,6 +116,23 @@ public abstract class AbstractExecutionIT { @Test public void test() throws Exception { + if (skip()) { + return; + } testExecutor.executeTest(PATH_ACTUAL, tcCtx, null, false); } + + protected boolean skip() { + // If the test case contains library commands, we skip them + List cUnits = tcCtx.getTestCase().getCompilationUnit(); + for (CompilationUnit cUnit : cUnits) { + List testFileCtxs = tcCtx.getTestFiles(cUnit); + for (TestFileContext ctx : testFileCtxs) { + if (ctx.getType().equals(EXTERNAL_LIBRARY_TEST_GROUP)) { + return true; + } + } + } + return false; + } } http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d3338f66/asterix-installer/src/test/java/org/apache/asterix/installer/test/ClusterExecutionIT.java ---------------------------------------------------------------------- diff --git a/asterix-installer/src/test/java/org/apache/asterix/installer/test/ClusterExecutionIT.java b/asterix-installer/src/test/java/org/apache/asterix/installer/test/ClusterExecutionIT.java index 97709cb..8db985d 100644 --- a/asterix-installer/src/test/java/org/apache/asterix/installer/test/ClusterExecutionIT.java +++ b/asterix-installer/src/test/java/org/apache/asterix/installer/test/ClusterExecutionIT.java @@ -73,7 +73,7 @@ public class ClusterExecutionIT extends AbstractExecutionIT { public static void tearDown() throws Exception { File outdir = new File(PATH_ACTUAL); File[] files = outdir.listFiles(); - if (files == null || files.length == 0) { + if ((files == null) || (files.length == 0)) { outdir.delete(); } @@ -102,6 +102,9 @@ public class ClusterExecutionIT extends AbstractExecutionIT { @Override @Test public void test() throws Exception { + if (skip()) { + return; + } testExecutor.executeTest(PATH_ACTUAL, tcCtx, null, false); } } http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d3338f66/asterix-installer/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterix-installer/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql b/asterix-installer/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql index 0789cf8..f188629 100644 --- a/asterix-installer/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql +++ b/asterix-installer/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql @@ -36,4 +36,6 @@ create dataset TweetsTestAdapter(TestTypedAdapterOutputType) primary key tweetid; create feed TestTypedAdapterFeed -using "testlib#test_typed_adapter" (("num_output_records"="5"),("type-name"="TestTypedAdapterOutputType")); +using "testlib#test_typed_adapter" ( +("num_output_records"="5"), +("type-name"="TestTypedAdapterOutputType")); http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d3338f66/asterix-installer/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterix-installer/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql b/asterix-installer/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql index ebbc65e..f9a6eda 100644 --- a/asterix-installer/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql +++ b/asterix-installer/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql @@ -45,9 +45,12 @@ create type TweetOutputType as closed { } create feed TweetFeed -using file_feed -(("type-name"="TweetInputType"),("fs"="localfs"),("path"="asterix_nc1://../../../../../../asterix-app/data/twitter/obamatweets.adm"),("format"="adm"),("tuple-interval"="10")) +using localfs +(("type-name"="TweetInputType"), +("path"="asterix_nc1://../../../../../../asterix-app/data/twitter/obamatweets.adm"), +("format"="adm"), +("tuple-interval"="10")) apply function testlib#parseTweet; -create dataset TweetsFeedIngest(TweetOutputType) +create dataset TweetsFeedIngest(TweetOutputType) primary key id; http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d3338f66/asterix-installer/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterix-installer/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql b/asterix-installer/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql index 0f40b07..d523247 100644 --- a/asterix-installer/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql +++ b/asterix-installer/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql @@ -29,6 +29,5 @@ create type Classad as open { create external dataset Condor(Classad) using localfs( ("path"="asterix_nc1://data/external-parser/jobads.new"), -("reader"="adm"), -("parser"="testlib#org.apache.asterix.external.library.ClassAdParserFactory"), -("reader-stream"="localfs")); +("format"="adm"), +("parser"="testlib#org.apache.asterix.external.library.ClassAdParserFactory"));