Class AbstractCommonTestSuiteChunkerImpl

    • Field Detail

      • DEFAULT_TEST_LISTENERS_SIZE

        static final int DEFAULT_TEST_LISTENERS_SIZE
        See Also:
        Constant Field Values
      • internalSuites

        private final java.util.List<TestCaseEntry> internalSuites
      • testAtDelegateMapper

        final java.util.LinkedHashMap<java.lang.Integer,​java.util.List<java.lang.Integer>> testAtDelegateMapper
      • testClasses

        final java.lang.Class<?>[] testClasses
      • currentTestIndex

        private int currentTestIndex
    • Constructor Detail

      • AbstractCommonTestSuiteChunkerImpl

        protected AbstractCommonTestSuiteChunkerImpl​(java.lang.Class<?> testClass)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • AbstractCommonTestSuiteChunkerImpl

        AbstractCommonTestSuiteChunkerImpl​(java.lang.Class<?>... testClasses)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getChunkSize

        public int getChunkSize()
        Description copied from interface: TestSuiteChunker
        Get the number of chunks defined in this suite.
        Specified by:
        getChunkSize in interface TestSuiteChunker
        Returns:
        The number of chunks defined in the correct suite.
      • getTestChunks

        public java.util.List<TestChunk> getTestChunks()
        Description copied from interface: TestSuiteChunker
        Get all chunk entries.
        Specified by:
        getTestChunks in interface TestSuiteChunker
        Returns:
        An set of entries that contains a list of methods contained in the chunk and the class loader that loaded these methods.
      • getTestChunksEntries

        public java.util.List<TestChunk> getTestChunksEntries​(java.lang.Class<?> testClass)
        Description copied from interface: TestSuiteChunker
        Get all chunk entries for a specific class.
        Specified by:
        getTestChunksEntries in interface TestSuiteChunker
        Parameters:
        testClass - The class whose chunk entries to get.
        Returns:
        An set of entries that contains a list of methods contained in the chunk for the specific test class and the class loader that loaded these methods.
      • getTestChunk

        public TestChunk getTestChunk​(java.lang.reflect.Method method)
        Description copied from interface: TestSuiteChunker
        Get TestChunk for the given method.
        Specified by:
        getTestChunk in interface TestSuiteChunker
        Parameters:
        method - - method for which test chunk should be found.
        Returns:
        TestChunk for this method.
      • chunkClass

        private void chunkClass​(java.lang.Class<?> testClass)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createDefaultMockLoader

        private java.lang.ClassLoader createDefaultMockLoader​(java.lang.Class<?> testClass,
                                                              java.util.Collection<java.lang.reflect.Method> testMethodsForOtherClassLoaders)
      • putMethodToChunk

        private void putMethodToChunk​(TestCaseEntry testCaseEntry,
                                      java.lang.Class<?> testClass,
                                      java.lang.reflect.Method method)
      • createClassLoaderForMethod

        private java.lang.ClassLoader createClassLoaderForMethod​(java.lang.Class<?> testClass,
                                                                 java.lang.reflect.Method method)
      • testMethodAnnotation

        protected java.lang.Class<? extends java.lang.annotation.Annotation> testMethodAnnotation()
      • initEntries

        private void initEntries​(java.util.List<TestCaseEntry> entries)
      • findMethods

        private void findMethods​(TestCaseEntry testCaseEntry,
                                 java.lang.Class<?> testClass)
      • hasChunkAnnotation

        private boolean hasChunkAnnotation​(java.lang.reflect.Method method)
      • updatedIndexes

        private void updatedIndexes()