Class InvestigationTestRunsHolderImpl

    • Field Detail

      • TEAMCITY_INVESTIGATIONS_RESET_BUILD_TYPE_CACHE_DELAY

        @NonNls
        public static final String TEAMCITY_INVESTIGATIONS_RESET_BUILD_TYPE_CACHE_DELAY
        See Also:
        Constant Field Values
    • Method Detail

      • getLastFailedTestRuns

        @NotNull
        public Map<String,​HashMap<String,​STestRun>> getLastFailedTestRuns​(long testNameId,
                                                                                      @NotNull
                                                                                      SProject project)
        Description copied from interface: InvestigationTestRunsHolder
        Returns last failed test runs for a specified test in specified collection. I.e. the result list consists of last run in complete builds in default branch for each build type in a project and failed test runs in branches

        Currently the result of the method includes successful builds and exclude running build.

        Specified by:
        getLastFailedTestRuns in interface InvestigationTestRunsHolder
        Parameters:
        testNameId - the test id
        project - the top-most parent project for the returned test runs (project or some of its subprojects (not only direct))
        Returns:
        the map (buildTYpeId -> map (branchName -> STestRun)), branchName == null is for default branches
      • getLastTestRunsInBulk

        @NotNull
        public List<STestRun> getLastTestRunsInBulk​(@NotNull
                                                    Set<Long> testNameIds,
                                                    @NotNull
                                                    String projectId,
                                                    boolean onlyForDefaultBranch)
        Description copied from interface: InvestigationTestRunsHolder
        Returns all test runs for all specified tests and in the specified project.
        Specified by:
        getLastTestRunsInBulk in interface InvestigationTestRunsHolder
        Parameters:
        testNameIds - test name ids
        projectId - project id - parent project for returned TestRuns (project or some of its subprojects (not only direct))
        onlyForDefaultBranch - whether we should collect test runs for default branch only or for all the branches. the flag is ignored when processing for branches is disabled.
        Returns:
        the list of all recent test runs;
      • isFixedInDefaultBranch

        public boolean isFixedInDefaultBranch​(@NotNull
                                              String buildTypeId,
                                              long testNameId)
        Description copied from interface: InvestigationTestRunsHolder
        Return true if there was a recent build in the default branch of the given build configuration, where test with given testNameId got fixed. If the test fails again after the fix, the method returns false
        Specified by:
        isFixedInDefaultBranch in interface InvestigationTestRunsHolder
        Returns:
        see above
      • getWorstInvestigatedOrMutedTestRuns

        @NotNull
        public Map<Long,​STestRun> getWorstInvestigatedOrMutedTestRuns​(@NotNull
                                                                            SBuild build)
        Description copied from interface: InvestigationTestRunsHolder
        Returns map of worst test runs for each testNameId from build (for tests under investigation or mute). For instance if there are successful test run and failed test run for same testNameId, the method will return failed one only.
        Specified by:
        getWorstInvestigatedOrMutedTestRuns in interface InvestigationTestRunsHolder
        Returns:
        map testNameId to worst in the build STestRun
      • invokeInactiveBranchesCleanUpForTesting

        @TestOnly
        public void invokeInactiveBranchesCleanUpForTesting()
      • invokeLoadTestRunsToWatch

        @TestOnly
        public void invokeLoadTestRunsToWatch()
      • resetFixedInDefaultCache

        @TestOnly
        public void resetFixedInDefaultCache()
      • setExecutor

        public void setExecutor​(@NotNull
                                ExecutorService executor)