com.atlassian.bamboo.resultsummary.tests
Class TestQuarantineManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.resultsummary.tests.TestQuarantineManagerImpl
All Implemented Interfaces:
TestQuarantineManager

public class TestQuarantineManagerImpl
extends Object
implements TestQuarantineManager


Field Summary
 
Fields inherited from interface com.atlassian.bamboo.resultsummary.tests.TestQuarantineManager
QUARANTINE_TEST_KEY
 
Constructor Summary
TestQuarantineManagerImpl(TestCaseDao testCaseDao, TestCaseResultDao testCaseResultDao, TestsManager testsManager, CachedPlanManager cachedPlanManager)
           
 
Method Summary
 int countCurrentlyQuarantinedTests(ImmutableChain chain)
          Returns the number of tests current qurantined for this plan
 List<TestCase> getCurrentlyQuarantinedTests(ImmutableChain chain)
          Get a list of TestCase of all the tests currently quarantined for a given plan
 List<TestCase> getCurrentlyQuarantinedTests(ImmutableJob job)
          Get a list of TestClass and TestCase names of all the tests currently quarantined for a given job In string form for use in the BuildContext custom config
 List<TestCaseResult> getQuarantinedTestsListForBuildResult(BuildResultsSummary buildResultsSummary)
          Returns List of TestCaseResult that are quarantined for a given build result.
 List<TestCaseResult> getQuarantinedTestsListForChainResult(ChainResultsSummary chainResultsSummary)
          Get a list of TestCase of all the tests quarantined for a given chain result
 void quarantineTest(long testId, com.atlassian.user.User user, Date date)
          Quarantines a given test
 void quarantineTest(long testId, com.atlassian.user.User user, Date date, Date expiryDate)
          Quarantines a given test until a specified date
 void unleashTest(long testId)
          Unleash a given test
 void unleashTestsWithExpiredQuarantine()
          Unleashes all tests with expired quarantine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestQuarantineManagerImpl

public TestQuarantineManagerImpl(TestCaseDao testCaseDao,
                                 TestCaseResultDao testCaseResultDao,
                                 TestsManager testsManager,
                                 CachedPlanManager cachedPlanManager)
Method Detail

quarantineTest

public void quarantineTest(long testId,
                           @NotNull
                           com.atlassian.user.User user,
                           @NotNull
                           Date date)
Description copied from interface: TestQuarantineManager
Quarantines a given test

Specified by:
quarantineTest in interface TestQuarantineManager
Parameters:
testId - - Id of the required test case
user - - @NotNull User quarantining test
date - - date of test quarantine

quarantineTest

public void quarantineTest(long testId,
                           @NotNull
                           com.atlassian.user.User user,
                           @NotNull
                           Date date,
                           @Nullable
                           Date expiryDate)
Description copied from interface: TestQuarantineManager
Quarantines a given test until a specified date

Specified by:
quarantineTest in interface TestQuarantineManager
Parameters:
testId - - Id of the required test case
user - - @NotNull User quarantining test
date - - date of test quarantine
expiryDate - - date of expiry for the quarantine, can be null for permanent quarantine

unleashTest

public void unleashTest(long testId)
Description copied from interface: TestQuarantineManager
Unleash a given test

Specified by:
unleashTest in interface TestQuarantineManager
Parameters:
testId - - ID of required test case

getCurrentlyQuarantinedTests

@NotNull
public List<TestCase> getCurrentlyQuarantinedTests(@NotNull
                                                           ImmutableChain chain)
Description copied from interface: TestQuarantineManager
Get a list of TestCase of all the tests currently quarantined for a given plan

Specified by:
getCurrentlyQuarantinedTests in interface TestQuarantineManager
Parameters:
chain - - the chain representing a plan to get quarantined tests for
Returns:
A list of TestCase

countCurrentlyQuarantinedTests

public int countCurrentlyQuarantinedTests(ImmutableChain chain)
Description copied from interface: TestQuarantineManager
Returns the number of tests current qurantined for this plan

Specified by:
countCurrentlyQuarantinedTests in interface TestQuarantineManager
Returns:

getQuarantinedTestsListForChainResult

@Nullable
public List<TestCaseResult> getQuarantinedTestsListForChainResult(@NotNull
                                                                           ChainResultsSummary chainResultsSummary)
Description copied from interface: TestQuarantineManager
Get a list of TestCase of all the tests quarantined for a given chain result

Specified by:
getQuarantinedTestsListForChainResult in interface TestQuarantineManager
Parameters:
chainResultsSummary - - results summary of the build you need quarantined tests for
Returns:
a list of TestCase of all the tests quarantined for a chain result

getQuarantinedTestsListForBuildResult

@NotNull
public List<TestCaseResult> getQuarantinedTestsListForBuildResult(@NotNull
                                                                          BuildResultsSummary buildResultsSummary)
Description copied from interface: TestQuarantineManager
Returns List of TestCaseResult that are quarantined for a given build result.

Specified by:
getQuarantinedTestsListForBuildResult in interface TestQuarantineManager
Parameters:
buildResultsSummary - - results summary of the build you need quarantined tests for
Returns:
List of TestCaseResult. Empty list if no quarantined tests

getCurrentlyQuarantinedTests

@NotNull
public List<TestCase> getCurrentlyQuarantinedTests(@NotNull
                                                           ImmutableJob job)
Description copied from interface: TestQuarantineManager
Get a list of TestClass and TestCase names of all the tests currently quarantined for a given job In string form for use in the BuildContext custom config

Specified by:
getCurrentlyQuarantinedTests in interface TestQuarantineManager
Parameters:
job - to get quarantined tests for
Returns:
A list of TestCase

unleashTestsWithExpiredQuarantine

public void unleashTestsWithExpiredQuarantine()
Description copied from interface: TestQuarantineManager
Unleashes all tests with expired quarantine.

Specified by:
unleashTestsWithExpiredQuarantine in interface TestQuarantineManager


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.