Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2175

DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      contrib/dih has some @Ignored tests because there is no in-memory or mock database/mail server:

          [junit] ------------- ---------------- ---------------
          [junit] Testsuite: org.apache.solr.handler.dataimport.TestJdbcDataSource
          [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.034 sec
          [junit]
          [junit] ------------- Standard Error -----------------
          [junit] NOTE: Ignoring test method 'testBasic': Needs a Mock database server to work
      ...
          [junit] Testsuite: org.apache.solr.handler.dataimport.TestMailEntityProcessor
          [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0.038 sec
          [junit]
          [junit] ------------- Standard Error -----------------
          [junit] NOTE: Ignoring test method 'testConnection': Needs a Mock Mail Server to work
          [junit] NOTE: Ignoring test method 'testRecursion': Needs a Mock Mail Server to work
          [junit] NOTE: Ignoring test method 'testExclude': Needs a Mock Mail Server to work
          [junit] NOTE: Ignoring test method 'testInclude': Needs a Mock Mail Server to work
          [junit] NOTE: Ignoring test method 'testIncludeAndExclude': Needs a Mock Mail Server to work
          [junit] NOTE: Ignoring test method 'testFetchTimeSince': Needs a Mock Mail Server to work
          [junit] ------------- ---------------- ---------------
      

      One way to improve this would be to use something like apache derby for tests to make little databases and test against.

      Additionally, looking thru JIRA there are a lot of JDBC-related issues and once something like this is setup,
      I think things could improve without introducing more bugs.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rcmuir Robert Muir
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: