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 C06A37CDB for ; Mon, 15 Aug 2011 21:05:56 +0000 (UTC) Received: (qmail 31912 invoked by uid 500); 15 Aug 2011 21:05:56 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 31840 invoked by uid 500); 15 Aug 2011 21:05:55 -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 31832 invoked by uid 99); 15 Aug 2011 21:05:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2011 21:05:55 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.kocoloski@gmail.com designates 209.85.218.52 as permitted sender) Received: from [209.85.218.52] (HELO mail-yi0-f52.google.com) (209.85.218.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2011 21:05:50 +0000 Received: by yie13 with SMTP id 13so5043363yie.11 for ; Mon, 15 Aug 2011 14:05:29 -0700 (PDT) Received: by 10.236.165.101 with SMTP id d65mr13435859yhl.150.1313442329446; Mon, 15 Aug 2011 14:05:29 -0700 (PDT) Received: from [192.168.0.164] (c-24-60-185-198.hsd1.ma.comcast.net [24.60.185.198]) by mx.google.com with ESMTPS id c63sm3699370yhe.46.2011.08.15.14.05.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Aug 2011 14:05:26 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Futon Test Suite From: Adam Kocoloski In-Reply-To: Date: Mon, 15 Aug 2011 17:05:21 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <535FB000-980B-49DC-A44A-F0ACBC74033E@apache.org> References: <0E1FA99D-744A-4501-BBF9-5F29CB9D7F12@dionne-associates.com> To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1084) Ah, you'd just embed the http-parser itself, reducing dependencies = instead of trading one for another. +1, Adam On Aug 15, 2011, at 10:41 AM, Paul Davis wrote: > Not sure I follow what you mean there. When I mentioned node's HTTP > parser, I meant, the parser [1]. I'd still have to write my own C > adaptor for that to Spidermonkey objects. Not entirely certain on the > REPL bit, but couchjs was basically a hack on top of the Spidermonkey > js REPL so going back to our roots a bit there shouldn't be too hard. >=20 > [1] https://github.com/ry/http-parser >=20 > On Mon, Aug 15, 2011 at 8:38 AM, Adam Kocoloski = wrote: >> I thought about suggesting node's parser, especially since you'd get = the REPL for free. I think the downside is that there are roughly 300 = versions of node out there, and I'd hate for our tests to keep breaking = because of node's development pace. libcurl is nothing if not stable. >>=20 >> Adam >>=20 >> On Aug 14, 2011, at 12:55 PM, Paul Davis wrote: >>=20 >>> My plan was to rewrite couch.js to use the new request/response >>> classes internally and then when we need closer HTTP access we'd be >>> able to have it. Same for T and Tequals. and what not. There is at >>> least one test that we just can't make work in our current couchjs >>> based test runner because it needs to use async HTTP requests, so at = a >>> certain point we have to at least add some of this stuff. >>>=20 >>> I quite like using etap over eunit as it seems more better. Also, = now >>> that we're going to a second language for make check tests, it seems >>> like an even better approach. Though I'm not at all married to it by >>> any means. Also, I do understand your concerns about moving parts = and >>> uncessesary dependencies. I should get around to updating the build >>> system to use the single file etap distribution but its never really >>> been a concern. >>>=20 >>> Another thing I've been contemplating is if it'd be beneficial to >>> remove libcurl and replace it with node.js's parser or with the = ragel >>> parser from Mongrel. Anyway, food for thought. I'll be around this >>> afternoon to hack. >>>=20 >>> On Sun, Aug 14, 2011 at 7:50 AM, Robert Dionne >>> wrote: >>>> Paul, >>>>=20 >>>> This is interesting, and if you're willing to put together the new = infrastructure I can help with writing tests. I would suggest a more = incremental approach that's less of a rewrite (rewrites often just get = you back to 0 from a user's perspective). >>>>=20 >>>> The existing CouchDB JS object seems to work ok in terms of the = http interface, and the Futon tests more or less all ran using couchjs = until very recently. I would suggest getting these all running first, = reusing copies of the existing CouchDB objects and such so we can hack = them as needed. Then we would review and throw out all the tests that = are not part of the core APIs, like the coffee stuff (I don't know why = we decided to bundle coffee in there) and any tests that are for = specific internals. >>>>=20 >>>> At some point something like BigCouch is integrated in or = MobileCouch we might have different "make" targets for the different = deployments. Perhaps in that case we'd have different sets of tests. = There needs to be a set of tests that can verify that the semantics of = API calls is the same in CouchDB and BigCouch. >>>>=20 >>>> So I'd say let's work backwards from what we have. Also I'm not a = big fan of etap, preferring eunit mainly because it's one less moving = part. For JS we already have this T(...) and TEquals(....) funs which = seem to do the trick. >>>>=20 >>>> All that said, I have a few hours today to hack on this today if = you want some help just ping me on #couchdb >>>>=20 >>>> Bob >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> On Aug 12, 2011, at 11:46 AM, Paul Davis wrote: >>>>=20 >>>>> Here's a bit of a brain dump on the sort of environment I'd like = to >>>>> see our CLI JS tests have. If anyone has any thoughts I'd like to = hear >>>>> them. Otherwise I'll start hacking on this at some point over the >>>>> weekend. >>>>>=20 >>>>> https://gist.github.com/1142306 >>>>=20 >>>>=20 >>=20 >>=20