Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-11

Enable build to skip long-running tests

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 0.1
    • 0.1
    • test-infrastructure
    • None

      Some unit tests are a bit slower than what we normally expect of unit tests. We should add an annotation that can be used with JUnit unit tests to identify long-running tests that can be skipped if the build wants to skip all long-running tests (which we should do by default).

      To mark a test method in a JUnit class as long running, annotate it with @SkipLongRunning, and then add the following field to the JUnit class:

      @Rule
      public TestRule skipTestRule = new SkipTestRule();
      

      The build uses the skipLongRunningTests property to define whether the long-running tests should be skipped. By default, the Maven builds such as mvn clean install will skip the long-running tests by setting this property to true, while the "assembly" profile sets the property to false and can be executed with mvn clean install -Passembly.

      Meanwhile, the Travis-CI build runs all tests by running the following:

      $ mvn clean install -DskipLongRunningTests=false
      

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: