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 A0367F432 for ; Thu, 28 Mar 2013 17:52:41 +0000 (UTC) Received: (qmail 24385 invoked by uid 500); 28 Mar 2013 17:51:50 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 20156 invoked by uid 500); 28 Mar 2013 17:51:43 -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 16003 invoked by uid 99); 28 Mar 2013 17:48:44 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Mar 2013 17:48:44 +0000 Received: from localhost (HELO mail-ia0-f170.google.com) (127.0.0.1) (smtp-auth username nslater, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Mar 2013 17:48:43 +0000 Received: by mail-ia0-f170.google.com with SMTP id h8so8647579iaa.29 for ; Thu, 28 Mar 2013 10:48:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:content-type:x-gm-message-state; bh=UXBOimmfJn3L5bd8K3zDWrxhRQw408svncn3eMcwHnA=; b=U6obIzD2R3DiSursZfMU7KGwiObEJtg8NtbYwGjGIl3GPY8AVzxXDpDfFGys5Kxak7 FnAx/R4GE2mjg04uswbUPHttFZGswvB/2B5tqpKKUCwHFZMUNAbYSVk/2k3bcF9ncYXZ AxP1bv/NpmRzrd0mA9vCmQR9RiSVL+SZhhCgbmUP2DwyNe5aHwNNSlm/QfU3YMAJGJUj XeCyPCUmCQzacjlDnVNyyJH0/rhu1YpW5jvTsuRn6XDc/Isptf9QEvIYNJqZQWRHQZTM 8fFMwSmwMFELQPpkCxZHK4PI8fw1ppi7GdyvUcC8NkQSnfbiGb+BQwauu5l0W/Yr78ap aTsg== MIME-Version: 1.0 X-Received: by 10.50.40.162 with SMTP id y2mr8011694igk.65.1364492922649; Thu, 28 Mar 2013 10:48:42 -0700 (PDT) Received: by 10.50.188.202 with HTTP; Thu, 28 Mar 2013 10:48:42 -0700 (PDT) X-Originating-IP: [178.250.115.206] In-Reply-To: <51547C60.3000603@apache.org> References: <51535F0B.7060408@apache.org> <51547C60.3000603@apache.org> Date: Thu, 28 Mar 2013 17:48:42 +0000 Message-ID: Subject: Re: Javascript Test Suite From: Noah Slater To: "dev@couchdb.apache.org" Content-Type: multipart/alternative; boundary=14dae9341283f4ab3004d8ffc37a X-Gm-Message-State: ALoCoQlR4ZxvZXEtuJCOx2hDdyN0vAu+pSeGIkpdkpekbF+t1y6WfxIdg6fP7gnDpnNfHL6THp4f --14dae9341283f4ab3004d8ffc37a Content-Type: text/plain; charset=ISO-8859-1 Sounds excellent! Very happy about this work! On 28 March 2013 17:22, 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 > -- NS --14dae9341283f4ab3004d8ffc37a--