Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 29877F1BC for ; Fri, 29 Mar 2013 18:20:50 +0000 (UTC) Received: (qmail 15147 invoked by uid 500); 29 Mar 2013 18:20:47 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 15097 invoked by uid 500); 29 Mar 2013 18:20:47 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 14991 invoked by uid 99); 29 Mar 2013 18:20:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Mar 2013 18:20:47 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.220.178 as permitted sender) Received: from [209.85.220.178] (HELO mail-vc0-f178.google.com) (209.85.220.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Mar 2013 18:20:41 +0000 Received: by mail-vc0-f178.google.com with SMTP id hz11so732211vcb.9 for ; Fri, 29 Mar 2013 11:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=uGBS7XtbJmsRObNcgnbFER8xbez/+BRoH4qhPbzZPqQ=; b=lRILXHZp+/U/rUT6BAzGhSKc8pIKSjHpk1idig3nEhN0evudopbGguP46lJC5jceoB VYMW0VMkR/fatzUiJR0TEmfBeZTag75c4+kEyehc4qkJmoLaBeNx0SeXnk8xJ1a7LDd1 LCJLQvhXKkST0fy1N9UCnTrX0x9c1NaW7wFVgk1d1K20dPTDmanh0w+vHuA6BVQkhhTS bMS2n4r/LTt9C6y2q0dMZ3fUJDlURVG6qT7aOLhKO6woYVsIhM06qQt2VncCDxVZ+XEm fLkMUU/PGpvSEs+jaTT9PVpM5my8tCSr0r0onOxxFZMhA+GF25OfG6hjWy8z9WPeqpNx OP5A== X-Received: by 10.52.99.1 with SMTP id em1mr2212595vdb.48.1364581221230; Fri, 29 Mar 2013 11:20:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.54.41 with HTTP; Fri, 29 Mar 2013 11:19:41 -0700 (PDT) In-Reply-To: <51547C60.3000603@apache.org> References: <51535F0B.7060408@apache.org> <51547C60.3000603@apache.org> From: Paul Davis Date: Fri, 29 Mar 2013 13:19:41 -0500 Message-ID: Subject: Re: Javascript Test Suite To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Awesome work Wendall. For #2 I did some work during the merge stuff to try and make the server restarts more robust. Its a pretty small commit but definitely seemed to help. https://github.com/davisp/couchdb/commit/0cbf6a9cea01eea599524bcdb77dedb322c7ade4 On Thu, Mar 28, 2013 at 12:22 PM, Wendall Cada wrote: > On 03/27/2013 02:05 PM, Wendall Cada wrote: >> >> In 1.3.0, there is a new part of the test suite to run the javascript >> tests from the command line. I'm running into various issues on different >> hardware/OS configurations. Mostly, tests hanging or timing out and failing. >> These are really hard to troubleshoot, as they all pass just fine if run >> individually. >> >> What I'm experimenting with today is rewriting how the tests are >> implemented to be run one at a time from a loop in bash, versus a loop in >> javascript. I think the failures I'm running into are improper >> setup/teardown. There may be an issue with rapid delete and adding a db, or >> rapidly starting and stopping couchdb, but I think this is not what's >> happening in my failures. >> >> The nature of spidermonkey doesn't allow for spawning threads, or >> sandboxing, etc, so it's hard looking at the test suite to see how I can >> improve running all tests. I think it's far better to have the setup spawn a >> new interpreter for each test. Tear down will kill the interpreter. >> >> Wendall > > An update here. I spent some time with this yesterday. > > There are two problems here I'd like to address. > > 1. When running `make check`, the entire javascript test suite runs in a > single interpreter thread. This means that if there are any broken tests, > then entire suite bails, as it can crash the interpreter. As I said, to > address this, I simply want to refactor the test suite to spawn a new > interpreter thread for every test. This is working well for me with my quick > work yesterday, and allows me to put a small delay in between tests to > ensure proper tear down from the previous test. > > 2. Some of the tests are written in a way that can cause a race condition in > the test itself. Quite a few places exist in the current javascript tests > where infinite loops can get generated. I simply want to re-factor several > of these tests to work as expected and avoid the race conditions entirely. > > One additional thought I had was to mimic the output of the etap tests a bit > more. Show the entire path to the test file being run, with a status at the > end of the line. Change the individual test run to include the full path to > the test to be run. Additionally, the run scripts would benefit from having > some help output. I'm in the process of gathering notes for the > documentation as well. > > My thinking is that if the test suites are similar, it will be helpful to > new developers in troubleshooting issues. > > If nobody has any objections, I'd like to get started on this work. I have a > local branch in progress for this already, but it's mostly just a scratch > space for testing so far. > > Wendall