Examples of PurgeConfiguration


Examples of org.sonar.core.purge.PurgeConfiguration

    task.purge(1L);

    verify(purgeDao).purge(argThat(new ArgumentMatcher<PurgeConfiguration>() {
      @Override
      public boolean matches(Object o) {
        PurgeConfiguration conf = (PurgeConfiguration) o;
        return conf.rootProjectId() == 1L && conf.scopesWithoutHistoricalData().length == 1 && conf.scopesWithoutHistoricalData()[0].equals(Scopes.FILE);
      }
    }));
  }
View Full Code Here

Examples of org.sonar.core.purge.PurgeConfiguration

    task.purge(1L);

    verify(purgeDao).purge(argThat(new ArgumentMatcher<PurgeConfiguration>() {
      @Override
      public boolean matches(Object o) {
        PurgeConfiguration conf = (PurgeConfiguration) o;
        return conf.rootProjectId() == 1L &&
          conf.scopesWithoutHistoricalData().length == 2 &&
          conf.scopesWithoutHistoricalData()[0].equals(Scopes.DIRECTORY) &&
          conf.scopesWithoutHistoricalData()[1].equals(Scopes.FILE);
      }
    }));
  }
View Full Code Here

Examples of org.sonar.core.purge.PurgeConfiguration

    verify(purgeDao, times(1)).purge(any(PurgeConfiguration.class));
  }

  @Test
  public void shouldDumpProfiling() {
    PurgeConfiguration conf = new PurgeConfiguration(1L, new String[0], 30);
    PurgeDao purgeDao = mock(PurgeDao.class);
    when(purgeDao.purge(conf)).thenThrow(new RuntimeException());
    Settings settings = new Settings(new PropertyDefinitions(DbCleanerProperties.all()));
    settings.setProperty(CoreProperties.PROFILING_LOG_PROPERTY, true);
    PurgeProfiler profiler = mock(PurgeProfiler.class);
View Full Code Here

Examples of org.sonar.core.purge.PurgeConfiguration

  @Override
  public void execute(DbSession session, AnalysisReportDto report, ComponentDto project) {
    Long projectId = project.getId();

    Settings settings = projectSettingsFactory.newProjectSettings(projectId, session);
    PurgeConfiguration purgeConfiguration = newDefaultPurgeConfiguration(projectId, settings);

    purgeTask.purge(session, purgeConfiguration, settings);

    if (purgeConfiguration.maxLiveDateOfClosedIssues() != null) {
      issueIndex.deleteClosedIssuesOfProjectBefore(project.uuid(), purgeConfiguration.maxLiveDateOfClosedIssues());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.