]> source.dussan.org Git - sonarqube.git/commitdiff
Remove IndexViewsStep as Views is currently disabled
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 21 May 2015 14:57:18 +0000 (16:57 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 21 May 2015 15:07:29 +0000 (17:07 +0200)
server/sonar-server/src/main/java/org/sonar/server/computation/step/ComputationSteps.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/IndexViewsStep.java [deleted file]
server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepsTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/IndexViewsStepTest.java [deleted file]

index f846367ebaf052e38023a68b467d20ff8d090bd7..25d58b8cc40c658ef48a5e4acffb4dc01068e323 100644 (file)
@@ -60,7 +60,6 @@ public class ComputationSteps {
       IndexIssuesStep.class,
       IndexSourceLinesStep.class,
       IndexTestsStep.class,
-      IndexViewsStep.class,
 
       // notifications are sent at the end, so that webapp displays up-to-date information
       SendIssueNotificationsStep.class);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/step/IndexViewsStep.java b/server/sonar-server/src/main/java/org/sonar/server/computation/step/IndexViewsStep.java
deleted file mode 100644 (file)
index 98ca5fd..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-package org.sonar.server.computation.step;
-
-import org.sonar.server.computation.ComputationContext;
-import org.sonar.server.view.index.ViewIndexer;
-
-public class IndexViewsStep implements ComputationStep {
-
-  private final ViewIndexer indexer;
-
-  public IndexViewsStep(ViewIndexer indexer) {
-    this.indexer = indexer;
-  }
-
-  @Override
-  public void execute(ComputationContext context) {
-    indexer.index(context.getProject().uuid());
-  }
-
-  @Override
-  public String getDescription() {
-    return "Index views";
-  }
-}
index a69c778647368b701226e21559a662ff31bc9928..dad2e0562e8ce6511026191ce647ac8ca30c1923 100644 (file)
@@ -35,7 +35,6 @@ public class ComputationStepsTest {
       mock(ApplyPermissionsStep.class),
       mock(ParseReportStep.class),
       mock(IndexSourceLinesStep.class),
-      mock(IndexViewsStep.class),
       mock(PersistIssuesStep.class),
       mock(IndexIssuesStep.class),
       mock(SwitchSnapshotStep.class),
@@ -52,9 +51,9 @@ public class ComputationStepsTest {
       mock(IndexTestsStep.class)
       );
 
-    assertThat(registry.orderedSteps()).hasSize(18);
+    assertThat(registry.orderedSteps()).hasSize(17);
     assertThat(registry.orderedSteps().get(0)).isInstanceOf(ParseReportStep.class);
-    assertThat(registry.orderedSteps().get(17)).isInstanceOf(SendIssueNotificationsStep.class);
+    assertThat(registry.orderedSteps().get(16)).isInstanceOf(SendIssueNotificationsStep.class);
   }
 
   @Test
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/step/IndexViewsStepTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/step/IndexViewsStepTest.java
deleted file mode 100644 (file)
index d2d8b2b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-package org.sonar.server.computation.step;
-
-import org.junit.Test;
-import org.sonar.api.resources.Qualifiers;
-import org.sonar.server.component.ComponentTesting;
-import org.sonar.server.computation.ComputationContext;
-import org.sonar.server.view.index.ViewIndexer;
-
-import static org.mockito.Mockito.*;
-
-public class IndexViewsStepTest extends BaseStepTest {
-
-  ComputationContext context = mock(ComputationContext.class);
-  ViewIndexer indexer = mock(ViewIndexer.class);
-  IndexViewsStep sut = new IndexViewsStep(indexer);
-
-  @Test
-  public void index_views() {
-    when(context.getProject()).thenReturn(ComponentTesting.newProjectDto("ABCD").setQualifier(Qualifiers.VIEW));
-
-    sut.execute(context);
-
-    verify(indexer).index("ABCD");
-  }
-
-  @Override
-  protected ComputationStep step() {
-    return sut;
-  }
-}