Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 18813 invoked from network); 8 Sep 2009 05:43:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Sep 2009 05:43:21 -0000 Received: (qmail 82993 invoked by uid 500); 8 Sep 2009 05:43:20 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 82918 invoked by uid 500); 8 Sep 2009 05:43:20 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 82908 invoked by uid 99); 8 Sep 2009 05:43:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2009 05:43:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2009 05:43:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 24747234C498 for ; Mon, 7 Sep 2009 22:42:58 -0700 (PDT) Message-ID: <1622620997.1252388578148.JavaMail.jira@brutus> Date: Mon, 7 Sep 2009 22:42:58 -0700 (PDT) From: "Noble Paul (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Commented: (SOLR-1413) Add MockSolrServer to SolrJ client tests In-Reply-To: <1119204869.1252209118055.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-1413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752350#action_12752350 ] Noble Paul commented on SOLR-1413: ---------------------------------- I guess your "Mock Servlets" do not use http session . If this is true everything should be ok.ideally requests to Solr does not need sessions > Add MockSolrServer to SolrJ client tests > ---------------------------------------- > > Key: SOLR-1413 > URL: https://issues.apache.org/jira/browse/SOLR-1413 > Project: Solr > Issue Type: Test > Components: clients - java > Environment: Any Solr distribution. Uses only the SolrJ client code, nothing in the Solr core. > Reporter: Lance Norskog > Priority: Minor > Attachments: SOLR-1413.patch, SOLR-1413.patch > > > The SolrJ unit test suite has no "mock" solr server for HTTP access, and there are no low-level tests of the Solrj HTTP wire protocols. > This patch includes org.apache.solr.client.solrj.MockHTTPServer.java and org.apache.solr.client.solrj.TestHTTP_XML_single.java. The mock server does not parse its input and responds with pre-configured byte streams. The latter does a few tests in the XML wire format. Most of the tests do one request and set up success and failure responses. > Unfortunately, there is a bug: I could not get 2 successive requests to work. The mock server's TCP socket does not work when reading the second request. If someone who knows the JDK socket classes could look at the mock server, I would greatly appreciate it. > The alternative is to steal a bunch of files from the apache commons httpclient test suite. This is a quite sophisticate bunch of code: > http://svn.apache.org/repos/asf/httpcomponents/oac.hc3x/trunk/src/test/org/apache/commons/httpclient/server/ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.