Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-16745

Fix test failures when running via IntelliJ

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 3.0.25
    • Test/unit
    • Quality Assurance
    • Low Hanging Fruit
    • All
    • None
    • Hide

      To test: remove the .idea folder, then regenerate it with ant generate-idea-files, then open in IntelliJ. Run a test that references a PropertyFileSnitch (like NetworkTopologyStrategyTest.testProperties) and see all tests pass. Also, confirm in Project Structure > Modules that test/conf is marked as Test Resources.

      Show
      To test: remove the .idea folder, then regenerate it with ant generate-idea-files, then open in IntelliJ. Run a test that references a PropertyFileSnitch (like NetworkTopologyStrategyTest.testProperties) and see all tests pass. Also, confirm in Project Structure > Modules that test/conf is marked as Test Resources.

    Description

      After running `ant generate-idea-files` and opening the project in IntelliJ IDEA 2021.1.2, tests that referenced PropertyFileSnitch (like NetworkTopologyStrategyTest.testProperties) failed with error org.apache.cassandra.exceptions.ConfigurationException: Unable to read cassandra-topology.properties.

       

      I fixed this issue in IntelliJ by marking test/conf as Test Resources (under Project Structure), and have patches to fix `ant generate-idea-files` so the manual reconfiguration is not necessary:

       

      3.0 - https://github.com/aratno/cassandra/tree/abe-fix-intellij-test-3-0

      Attachments

        Issue Links

          Activity

            People

              aratnofsky Abe Ratnofsky
              aratnofsky Abe Ratnofsky
              Abe Ratnofsky
              Caleb Rackliffe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: