Return-Path: X-Original-To: apmail-asterixdb-dev-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 486FD1895A for ; Thu, 28 Jan 2016 06:51:14 +0000 (UTC) Received: (qmail 50964 invoked by uid 500); 28 Jan 2016 06:51:14 -0000 Delivered-To: apmail-asterixdb-dev-archive@asterixdb.apache.org Received: (qmail 50908 invoked by uid 500); 28 Jan 2016 06:51:14 -0000 Mailing-List: contact dev-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 dev@asterixdb.incubator.apache.org Received: (qmail 50896 invoked by uid 99); 28 Jan 2016 06:51:13 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jan 2016 06:51:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 652CC180498 for ; Thu, 28 Jan 2016 06:51:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 94cgpbbzvvYm for ; Thu, 28 Jan 2016 06:51:07 +0000 (UTC) Received: from mail-ig0-f170.google.com (mail-ig0-f170.google.com [209.85.213.170]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id AE3C620426 for ; Thu, 28 Jan 2016 06:51:06 +0000 (UTC) Received: by mail-ig0-f170.google.com with SMTP id h5so6260504igh.0 for ; Wed, 27 Jan 2016 22:51:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=nCBtVmf6fziJSgXKlwvIeVpwxD71hNquSJzxjXpz3dU=; b=qWEHNFqf/Ixcg103rNrO7M5NZUrj1DtCNonfBvTHJUeG6Q1kw5GVqpK7VZDqw6MAYs fRmKEksJzEjqWtngKzLLqbyisC220r6trdoIH/eBIztH0JXO86XmB/wlvOydJTAVjwRM ILaRMNnaqlx0rBXimEG5rZb0pYuUp5U2KZUoj8SdlVj2eJdw1kZ9aKxeTAr3rzzCFhFa +iG2FdXUmP9/RwURICV1WjN4EJ59oFG4pfD6UlbkZ+jbw18pBjy+i0ARpfG5knfTmA0j KiNDjIXZx40tcUvMyc7AVssCp3t/2xIBNPGlCFm1pi62DT8+m1D4MRyM4gdcpZkmmV0T FL9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=nCBtVmf6fziJSgXKlwvIeVpwxD71hNquSJzxjXpz3dU=; b=KfluqB0NwqXEH9th2Ur7st/R0WOdviLVfxRcteydki7kkS3sxVWEoGqk666nO0rwQX q8T7jQr0OVjQJmCqxhpcFIJ8/rGubmX0kWAbHGAGLuwPk8IYVa4i1t0WAkOPopLHqeEG vleICxRnZct5nSHxJ4j/7ECKfGAAoPMgY6Shou8EW/bzm70HyHsxYwFqWk5SWk/ImlPR +wHuJt98P+2+pFy1kIGmRw8SdJNJ80k4iNx4H/3rVaxh8YSE6yGTtTFwAqCddvdSFgqo kg+WASSHe4UTUnVslONsBzOu9ZoxmbrcbTvxq7fuMuJkr6aoP50ViRJ5BJP0uFrNSJSB r6hQ== X-Gm-Message-State: AG10YOTjDIEBBG4WWQ2tWWUQJSYyvn42nRN6eyyHxSBVdFNmmbKmpXEPo7YHv4Txy7qruQNf66QA2klJ9O80pw== X-Received: by 10.50.8.106 with SMTP id q10mr1438097iga.67.1453963865989; Wed, 27 Jan 2016 22:51:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.25.207 with HTTP; Wed, 27 Jan 2016 22:50:46 -0800 (PST) In-Reply-To: <7AA2BA62-548E-4514-937B-65F769766344@gmail.com> References: <791F7DA5-49F2-4B4A-9321-BDA01CB52E46@gmail.com> <7AA2BA62-548E-4514-937B-65F769766344@gmail.com> From: Taewoo Kim Date: Wed, 27 Jan 2016 22:50:46 -0800 Message-ID: Subject: Re: Test Framework Improvements To: dev@asterixdb.incubator.apache.org Content-Type: multipart/alternative; boundary=089e013c65dcbfac6d052a5f57ed --089e013c65dcbfac6d052a5f57ed Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Murtadha, I see. Thank you for your patch. I will try to apply that. Best, Taewoo On Wed, Jan 27, 2016 at 8:08 PM, Murtadha Hubail wrote: > Hi Taewoo, > > No, this wasn=E2=80=99t caused by the improvements. However, before the > improvements, in case of ParseException we were not returning a summary a= t > all in the JSON output and we were getting JSONException all the time. I > have just submitted a patch[1] to add the stack trace in the JSON output > and now you should be able to see the original exception stack trace in t= he > "Failure Trace" of Unit. > > You may checkout it and test it. > > Cheers, > Murtadha > > [1] https://asterix-gerrit.ics.uci.edu/#/c/599/ < > https://asterix-gerrit.ics.uci.edu/#/c/599/> > > > On Jan 27, 2016, at 10:14 AM, Taewoo Kim wrote: > > > > This is indeed a good improvement. Regarding this, I have a question. > After > > merging the current master into my branch, I executed "executionTest" i= n > > Eclipse. And I found that "Failure Trace" stack trace in JUnit shows n= ot > > the origin of failure, rather it always shows "executeTest" like the > > following for each test cases. Originally, I could be able to see the > > origin - in this case - AQL Parser. But, now, with this summary, it is > hard > > to identify the origin. I have to execute each of failed test one by on= e > > and need to check console to see the real origin, not > > "TestExecutor.executeTest". I am wondering this is the result of test > frame > > work change? > > > > > > ExecutionTest > > org.apache.asterix.test.runtime.ExecutionTest > > [ExecutionTest 0: feeds: feeds_01] > > test[ExecutionTest 0: feeds: > > feeds_01](org.apache.asterix.test.runtime.ExecutionTest) > > java.lang.Exception: Test > > "src/test/resources/runtimets/queries/feeds/feeds_01/feeds_01.1.ddl.aql= " > > FAILED! > > at > > > org.apache.asterix.test.aql.TestExecutor.executeTest(TestExecutor.java:59= 4) > > at > org.apache.asterix.test.runtime.ExecutionTest.test(ExecutionTest.java:96) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :62) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:497) > > at > > > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMeth= od.java:47) > > at > > > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallabl= e.java:12) > > at > > > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod= .java:44) > > at > > > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.= java:17) > > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) > > at > > > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.= java:70) > > at > > > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.= java:50) > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) > > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) > > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) > > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) > > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > > at org.junit.runners.Suite.runChild(Suite.java:127) > > at org.junit.runners.Suite.runChild(Suite.java:26) > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) > > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) > > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) > > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) > > at > > > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java= :26) > > at > > > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:2= 7) > > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > > at > > > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4Test= Reference.java:50) > > at > > > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.jav= a:38) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:459) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:675) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunn= er.java:382) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRun= ner.java:192) > > Caused by: java.lang.Exception: HTTP operation failed: 2 > > STATUS LINE: HTTP/1.1 500 Server Error > > SUMMARY: SyntaxError: Encountered " "text" "text "" at line 32, column = 3. > > Was expecting one of: > > <STRING_LITERAL> ... > > <IDENTIFIER> ... > > > > =3D=3D> text : string, > > STACKTRACE: > > at > > > org.apache.asterix.test.aql.TestExecutor.executeHttpMethod(TestExecutor.j= ava:228) > > at > > > org.apache.asterix.test.aql.TestExecutor.executeDDL(TestExecutor.java:329= ) > > at > > > org.apache.asterix.test.aql.TestExecutor.executeTest(TestExecutor.java:43= 0) > > ... 34 more > > > > > > Best, > > Taewoo > > > > On Tue, Jan 12, 2016 at 12:46 PM, Murtadha Hubail > > wrote: > > > >> Hi All, > >> > >> Last night Abdullah and I merged the Asterix test framework improvemen= t > >> change. So, don=E2=80=99t be surprised if you have a test case that wo= rked > >> yesterday but not on the current master. > >> > >> During the development of the change, we discovered and fixed critical > >> issues such as: > >> 1. Failed Jobs' threads that are never terminated and their operators > keep > >> waiting forever. > >> 2. Many operators that do not comply with the IFrameWriter contract. > >> 3. Indeterministic result delivery on synchronous queries. > >> 4. Invalid number of active operations on an index after a transaction > >> aborts. > >> > >> All of these issues and many others were not detected before because o= f > >> the state the test framework was in. I encountered test cases that wer= e > >> miraculously passing just because they were expected to throw an > exception. > >> Just to give you an example, a test case was using the DDL API to run = a > >> query, and an exception was thrown saying "SyntaxError: Invalid > statement: > >> Non-Update statement=E2=80=9D and it was considered as passing, even t= hough the > >> expected exception was =E2=80=9CMetadataException: Unknown dataverse= =E2=80=9D. > >> > >> Due to those reasons, if you are adding any new test cases, you will > have > >> to provide the following: > >> 1. For each query in the test case, an expected result file (even > queries > >> that are expected to return no records). > >> 2. For each expected exception in the test case, you have to provide t= he > >> complete exception type as well as the expected error message. If you > have > >> multiple expected exceptions in the same test case, they need to be > ordered > >> in the same order they will be raised. > >> > >> Unfortunately, currently we don=E2=80=99t have standard error codes fo= r > exceptions > >> (e.g. ASX-0001: =E2=80=9CDuplicate key exception=E2=80=9D), so any cha= nges to the > >> exceptions messages will need to be reflected on the test cases, but > this > >> is better than having a broken test framework. > >> > >> Cheers, > >> Murtadha > > --089e013c65dcbfac6d052a5f57ed--