]> source.dussan.org Git - sonarqube.git/commitdiff
Remove some ignored tests and fix some commented-out code
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 13 Oct 2011 08:56:49 +0000 (10:56 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 13 Oct 2011 08:56:49 +0000 (10:56 +0200)
35 files changed:
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/ArchitectureCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/BytecodeCheck.java [deleted file]
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/SquidCheck.java
sonar-batch/src/main/java/org/sonar/batch/bootstrap/Module.java
sonar-batch/src/test/java/org/sonar/batch/DefaultSensorContextTest.java [deleted file]
sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/avoidConflictWithResourceFromOtherProject-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/avoidConflictWithResourceFromOtherProject.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotCacheDatabaseMeasures-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotCacheDatabaseMeasures.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotPersistInMemoryMeasures-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotPersistInMemoryMeasures.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveExcludedResources-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveExcludedResources.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveOptimizedBestValues-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveOptimizedBestValues.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveDependency-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveDependency.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveMeasureOnExistingResource-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveMeasureOnExistingResource.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveOptimizedBestValuesIfOptionalFields-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveOptimizedBestValuesIfOptionalFields.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveProjectMeasure-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveProjectMeasure.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourceTree-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourceTree.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourcesBeforeBuildingDependencies.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveRuleMeasures-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveRuleMeasures.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/updateExistingResourceFields-result.xml [deleted file]
sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/updateExistingResourceFields.xml [deleted file]
sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java

index 24d58e6dd9ade772da62d23c14545c60c8766403..0f05863e1c23d0615348935b574d0569c7bdc9ec 100644 (file)
@@ -31,6 +31,7 @@ import org.sonar.java.PatternUtils;
 import org.sonar.java.bytecode.asm.AsmClass;
 import org.sonar.java.bytecode.asm.AsmEdge;
 import org.sonar.java.bytecode.asm.AsmMethod;
+import org.sonar.java.bytecode.visitor.BytecodeVisitor;
 import org.sonar.squid.api.CheckMessage;
 import org.sonar.squid.api.SourceFile;
 import org.sonar.squid.api.SourceMethod;
@@ -38,7 +39,7 @@ import org.sonar.squid.api.SourceMethod;
 import com.google.common.collect.Maps;
 
 @Rule(key = "ArchitecturalConstraint", cardinality = Cardinality.MULTIPLE, priority = Priority.MAJOR)
-public class ArchitectureCheck extends BytecodeCheck {
+public class ArchitectureCheck extends BytecodeVisitor {
 
   @RuleProperty
   private String fromClasses = "";
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/BytecodeCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/BytecodeCheck.java
deleted file mode 100644 (file)
index 19792e6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
- */
-package org.sonar.java.bytecode.check;
-
-import org.sonar.java.bytecode.visitor.BytecodeVisitor;
-import org.sonar.squid.api.CodeCheck;
-
-public abstract class BytecodeCheck extends BytecodeVisitor {
-
-//  public String getKey() {
-//    return getClass().getSimpleName();
-//  }
-}
index 4ed21642c5d8ee2144923ef9ce8c61f13b91b72d..b959769fa4c8be54b5308d05ae7a61816e25868a 100644 (file)
@@ -24,11 +24,12 @@ import org.sonar.check.Rule;
 import org.sonar.java.bytecode.asm.AsmClass;
 import org.sonar.java.bytecode.asm.AsmEdge;
 import org.sonar.java.bytecode.asm.AsmMethod;
+import org.sonar.java.bytecode.visitor.BytecodeVisitor;
 import org.sonar.squid.api.CheckMessage;
 import org.sonar.squid.api.SourceFile;
 
 @Rule(key = "CallToDeprecatedMethod", priority = Priority.MINOR)
-public class CallToDeprecatedMethodCheck extends BytecodeCheck {
+public class CallToDeprecatedMethodCheck extends BytecodeVisitor {
 
   private AsmClass asmClass;
 
index 5b2d9337a26c24f12700e99555b7328a27f38ad6..da138179f9abde5958521054b074d2304baea59b 100644 (file)
@@ -23,12 +23,13 @@ import org.sonar.check.Priority;
 import org.sonar.check.Rule;
 import org.sonar.java.bytecode.asm.AsmClass;
 import org.sonar.java.bytecode.asm.AsmMethod;
+import org.sonar.java.bytecode.visitor.BytecodeVisitor;
 import org.sonar.squid.api.CheckMessage;
 import org.sonar.squid.api.SourceFile;
 import org.sonar.squid.api.SourceMethod;
 
 @Rule(key = "UnusedPrivateMethod", priority = Priority.MAJOR)
-public class UnusedPrivateMethodCheck extends BytecodeCheck {
+public class UnusedPrivateMethodCheck extends BytecodeVisitor {
 
   private AsmClass asmClass;
 
index a167205ae3b4da79b36de10a77f81ff8349543e0..b9fdcc412239f33407e82b19efcfd0aae5345f3a 100644 (file)
@@ -23,12 +23,13 @@ import org.sonar.check.Priority;
 import org.sonar.check.Rule;
 import org.sonar.java.bytecode.asm.AsmClass;
 import org.sonar.java.bytecode.asm.AsmMethod;
+import org.sonar.java.bytecode.visitor.BytecodeVisitor;
 import org.sonar.squid.api.CheckMessage;
 import org.sonar.squid.api.SourceFile;
 import org.sonar.squid.api.SourceMethod;
 
 @Rule(key = "UnusedProtectedMethod", priority = Priority.MAJOR)
-public class UnusedProtectedMethodCheck extends BytecodeCheck {
+public class UnusedProtectedMethodCheck extends BytecodeVisitor {
 
   private AsmClass asmClass;
 
index ff82b8060078c2c10c992718ee4461dc6cea8bf2..279f808684f4a7d49336c6764c1e1af4fb9f7de9 100644 (file)
@@ -17,7 +17,6 @@
  * License along with Sonar; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
  */
-
 package org.sonar.java.squid.check;
 
 import org.sonar.java.squid.visitor.SquidVisitor;
@@ -26,10 +25,6 @@ import org.sonar.squid.api.SourceFile;
 import org.sonar.squid.api.SourceMethod;
 
 public class SquidCheck implements SquidVisitor {
-//
-//  public String getKey() {
-//    return getClass().getSimpleName();
-//  }
 
   public void visitFile(SourceFile sourceFile) {
   }
index bba921ab6de89ca664e2d6ef29138f9d1e1418ae..a63177495b46ad88b524238d8a8a95a2e709ba94 100644 (file)
@@ -67,9 +67,6 @@ public abstract class Module {
    */
   public final Module installChild(Module child) {
     ComponentContainer childContainer = container.createChild();
-    // register container as a component, because it used for example in BatchExtensionDictionnary,
-    // but in fact this is anti-pattern - http://picocontainer.codehaus.org/container-dependency-antipattern.html
-    //childContainer.addComponent(new IocContainer(childContainer));
     child.init(childContainer);
     return child;
   }
@@ -110,7 +107,7 @@ public abstract class Module {
 
   /**
    * Implementation of this method must not contain conditional logic and just should contain several invocations of
-   * {@link #addCoreSingleton(Object)}, {@link #addComponent(Object, Object)} or {@link #addAdapter(ComponentAdapter)}.
+   * {@link #addCoreSingleton(Object)}, {@link #addExtension(org.sonar.api.platform.PluginMetadata, Object)} or {@link #addAdapter(ComponentAdapter)}.
    */
   protected abstract void configure();
 
@@ -141,12 +138,4 @@ public abstract class Module {
   public final <T> List<T> getComponents(Class<T> componentType) {
     return container.getComponentsByType(componentType);
   }
-
-//  /**
-//   * TODO should not be used and should be removed
-//   */
-//  public final MutablePicoContainer getContainer() {
-//    return container;
-//  }
-
 }
diff --git a/sonar-batch/src/test/java/org/sonar/batch/DefaultSensorContextTest.java b/sonar-batch/src/test/java/org/sonar/batch/DefaultSensorContextTest.java
deleted file mode 100644 (file)
index 096a7e5..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
- */
-package org.sonar.batch;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.sonar.api.database.model.Snapshot;
-import org.sonar.api.design.Dependency;
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.Measure;
-import org.sonar.api.measures.PersistenceMode;
-import org.sonar.api.measures.RuleMeasure;
-import org.sonar.api.resources.JavaFile;
-import org.sonar.api.resources.JavaPackage;
-import org.sonar.api.resources.Project;
-import org.sonar.api.resources.Resource;
-import org.sonar.api.rules.RulePriority;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import javax.persistence.Query;
-import java.text.ParseException;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
-
-@Ignore
-public class DefaultSensorContextTest extends AbstractDbUnitTestCase {
-  private DefaultSensorContext context;
-  private Project project;
-
-  @Before
-  public void before() {
-    project = null;
-    context = null;
-  }
-
-  @Test
-  public void saveProjectMeasure() throws ParseException {
-    setup("saveProjectMeasure");
-    context.saveMeasure(CoreMetrics.NCLOC, 500.0);
-    check("saveProjectMeasure", "projects", "snapshots", "project_measures");
-  }
-
-  @Test
-  public void saveMeasureOnExistingResource() throws ParseException {
-    setup("saveMeasureOnExistingResource");
-    context.saveMeasure(new JavaPackage("org.sonar"), CoreMetrics.NCLOC, 200.0);
-    check("saveMeasureOnExistingResource", "projects", "snapshots", "project_measures");
-  }
-
-  @Test
-  public void avoidConflictWithResourceFromOtherProject() throws ParseException {
-    setup("avoidConflictWithResourceFromOtherProject");
-    context.saveMeasure(new JavaPackage("org.sonar"), CoreMetrics.NCLOC, 200.0);
-    context.saveMeasure(new JavaPackage("org.sonar"), CoreMetrics.COVERAGE, 80.0);
-    check("avoidConflictWithResourceFromOtherProject", "projects", "snapshots", "project_measures");
-  }
-
-  @Test
-  public void doNotPersistInMemoryMeasures() throws ParseException {
-    setup("doNotPersistInMemoryMeasures");
-    Measure measure = new Measure(CoreMetrics.NCLOC, 30.0).setPersistenceMode(PersistenceMode.MEMORY);
-    context.saveMeasure(measure);
-
-    check("doNotPersistInMemoryMeasures", "projects", "snapshots", "project_measures");
-    assertThat(context.getMeasure(CoreMetrics.NCLOC).getValue(), is(30.0));
-  }
-
-  @Test
-  public void doNotCacheDatabaseMeasures() throws ParseException {
-    setup("doNotCacheDatabaseMeasures");
-    Measure measure = new Measure(CoreMetrics.NCLOC, 500.0).setPersistenceMode(PersistenceMode.DATABASE);
-    context.saveMeasure(measure);
-
-    check("doNotCacheDatabaseMeasures", "projects", "snapshots", "project_measures");
-    assertThat(context.getMeasure(CoreMetrics.NCLOC), nullValue());
-  }
-
-  @Test
-  public void saveRuleMeasures() throws ParseException {
-    setup("saveRuleMeasures");
-    context.saveMeasure(RuleMeasure.createForPriority(CoreMetrics.VIOLATIONS, RulePriority.CRITICAL, 500.0));
-    context.saveMeasure(RuleMeasure.createForCategory(CoreMetrics.VIOLATIONS, 3, 200.0));
-    //FIXME context.saveMeasure(RuleMeasure.createForRule(CoreMetrics.VIOLATIONS, 3).setIntValue(50.0));
-    check("saveRuleMeasures", "projects", "snapshots", "project_measures");
-  }
-
-  @Test
-  public void saveResourceTree() throws ParseException {
-//    setup("saveResourceTree");
-//
-//    assertThat(context.getResource("org.foo.Bar"), nullValue());
-//    context.saveResource(new JavaFile("org.foo.Bar"));
-//    assertThat(context.getResource("org.foo.Bar"), is((Resource) new JavaFile("org.foo.Bar")));
-//
-//    check("saveResourceTree", "projects", "snapshots");
-  }
-//
-//  @Test
-//  public void doNotSaveExcludedResources() throws ParseException {
-//    setup("doNotSaveExcludedResources");
-//
-//    JavaFile javaFile = new JavaFile("org.excluded.Bar");
-//    ResourceFilters resourceFilters = mock(ResourceFilters.class);
-//    when(resourceFilters.isExcluded(javaFile)).thenReturn(true);
-//    context.setResourceFilters(resourceFilters);
-//
-//    assertThat(context.getResource("org.excluded.Bar"), nullValue());
-//    assertThat(context.saveResource(javaFile), nullValue());
-//    assertThat(context.getResource("org.excluded.Bar"), nullValue());
-//
-//    check("doNotSaveExcludedResources", "projects", "snapshots");
-//  }
-
-  @Test
-  public void updateExistingResourceFields() throws ParseException {
-    setup("updateExistingResourceFields");
-
-    context.saveResource(new JavaPackage("org.foo"));
-
-    check("updateExistingResourceFields", "projects", "snapshots");
-  }
-
-  @Test
-  public void doNotSaveOptimizedBestValues() throws ParseException {
-    setup("doNotSaveOptimizedBestValues");
-
-    // best values of the metrics violations and blocker_violations are set as optimized
-    assertThat(CoreMetrics.VIOLATIONS.getBestValue(), is(0.0));
-    assertThat(CoreMetrics.BLOCKER_VIOLATIONS.getBestValue(), is(0.0));
-    assertThat(CoreMetrics.VIOLATIONS.isOptimizedBestValue(), is(true));
-    assertThat(CoreMetrics.BLOCKER_VIOLATIONS.isOptimizedBestValue(), is(true));
-
-    final Resource javaFile = new JavaFile("org.foo.Bar");
-    assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS), nullValue());
-    context.saveMeasure(javaFile, CoreMetrics.VIOLATIONS, 60.0); // saved
-    assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS).getValue(), is(60.0));
-
-    assertThat(context.getMeasure(javaFile, CoreMetrics.BLOCKER_VIOLATIONS), nullValue());
-    context.saveMeasure(javaFile, CoreMetrics.BLOCKER_VIOLATIONS, 0.0); // not saved in database
-    assertThat(context.getMeasure(javaFile, CoreMetrics.BLOCKER_VIOLATIONS).getValue(), is(0.0));
-
-    check("doNotSaveOptimizedBestValues", "projects", "snapshots", "project_measures");
-  }
-
-  @Test
-  public void saveOptimizedBestValuesIfOptionalFields() throws ParseException {
-    setup("saveOptimizedBestValuesIfOptionalFields");
-
-    // best value of the metric violations is set as optimized
-    assertThat(CoreMetrics.VIOLATIONS.getBestValue(), is(0.0));
-    assertThat(CoreMetrics.VIOLATIONS.isOptimizedBestValue(), is(true));
-
-    final Resource javaFile = new JavaFile("org.foo.Bar");
-    assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS), nullValue());
-    Measure measure = new Measure(CoreMetrics.VIOLATIONS, 0.0).setTendency(1);
-
-    context.saveMeasure(javaFile, measure); // saved
-
-    assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS).getValue(), is(0.0));
-    assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS).getTendency(), is(1));
-
-    check("saveOptimizedBestValuesIfOptionalFields", "projects", "snapshots", "project_measures");
-  }
-
-
-  @Test
-  public void saveDependency() throws ParseException {
-    setup("saveDependency");
-
-    JavaPackage pac1 = new JavaPackage("org.sonar.source");
-    JavaPackage pac2 = new JavaPackage("org.sonar.target");
-    context.saveResource(pac1);
-    context.saveResource(pac2);
-
-    Dependency dep = new Dependency(pac1, pac2)
-        .setUsage("INHERITS")
-        .setWeight(3);
-    context.saveDependency(dep);
-
-    assertThat(dep.getId(), not(nullValue()));
-
-    check("saveDependency", "projects", "snapshots", "dependencies");
-  }
-
-  @Test(expected = IllegalArgumentException.class)
-  public void saveResourcesBeforeBuildingDependencies() throws ParseException {
-    setup("saveResourcesBeforeBuildingDependencies");
-
-    JavaPackage pac1 = new JavaPackage("org.sonar.source");
-    JavaPackage pac2 = new JavaPackage("org.sonar.target");
-    context.saveDependency(new Dependency(pac1, pac2));
-  }
-
-
-  private void setup(String unitTest) throws ParseException {
-//    setupData(unitTest);
-//    project = mock(Project.class);
-//    when(project.getAnalysisVersion()).thenReturn("1.0");
-//    when(project.getAnalysisDate()).thenReturn(new SimpleDateFormat("yyyy-MM-dd").parse("2008-12-25"));
-//    when(project.getKey()).thenReturn("group:artifact");
-//    when(project.getScope()).thenReturn(Resource.SCOPE_SET);
-//    when(project.getQualifier()).thenReturn(Resource.QUALIFIER_PROJECT);
-//    when(project.getLanguage()).thenReturn(Java.INSTANCE);
-//    when(project.getId()).thenReturn(10);
-//    when(project.getName()).thenReturn("my project");
-//    when(project.isRoot()).thenReturn(true);
-//    ProjectBootstrap projectBootstrap = new ProjectBootstrap(null);
-//    projectBootstrap.setProject(project);
-//    projectBootstrap.setSnapshot(getSnapshot(1));
-//    context = new DefaultSensorContext(getSession(), projectBootstrap.setProject(project), getDao().getMeasuresDao(), null, null, null);
-  }
-
-  private void check(String unitTest, String... tables) {
-    getSession().commit();
-    checkTables(unitTest, tables);
-  }
-
-  private Snapshot getSnapshot(int id) {
-    Query query = getSession().createQuery("SELECT s FROM Snapshot s WHERE s.id=:id");
-    query.setParameter("id", id);
-    return (Snapshot) query.getSingleResult();
-  }
-}
index 3753b6752e87c35b3fa2f4edcdd7a7fcd47e12df..a1bf89534d4bbf0350c965fabc072b0b501090f9 100644 (file)
@@ -125,12 +125,6 @@ public class MeasurePersisterTest extends AbstractDbUnitTestCase {
     assertThat(coverageMeasures.get(0).getValue(), is(300.0));
   }
 
-  @Test
-  @Ignore("to do")
-  public void shouldInsertDataMeasure() {
-
-  }
-
   @Test
   public void shouldDelaySaving() {
     measurePersister.setDelayedMode(true);
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/avoidConflictWithResourceFromOtherProject-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/avoidConflictWithResourceFromOtherProject-result.xml
deleted file mode 100644 (file)
index aa28211..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-  <metrics id="2" NAME="coverage" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <!-- conflicting resources -->
-  <projects long_name="[null]" id="1" scope="PRJ" kee="othergroup:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-  <projects long_name="[null]" id="2" scope="DIR" kee="othergroup:artifact:org.sonar" qualifier="PAC" name="org.sonar"
-            root_id="2"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar" qualifier="PAC" name="org.sonar"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <!-- the project snapshot -->
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <!-- conflicting snapshots -->
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2007-10-02 13:58:00.00" version="2.0" project_id="1" scope="PRJ" qualifier="TRK"
-             root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2007-10-02 13:58:00.00" version="[null]" project_id="2" scope="DIR" qualifier="PAC"
-             root_project_id="1" root_snapshot_id="2" parent_snapshot_id="2" STATUS="U" ISLAST="false" path="3."
-             depth="1"/>
-
-  <!-- the package snapshot -->
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="4" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
-             depth="1"/>
-
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="1" VALUE="200" METRIC_ID="1" SNAPSHOT_ID="4" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="2" VALUE="80" METRIC_ID="2" SNAPSHOT_ID="4" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/avoidConflictWithResourceFromOtherProject.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/avoidConflictWithResourceFromOtherProject.xml
deleted file mode 100644 (file)
index cb9e2a9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-  <metrics id="2" NAME="coverage" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <!-- conflicting resources -->
-  <projects long_name="[null]" id="1" scope="PRJ" kee="othergroup:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-  <projects long_name="[null]" id="2" scope="DIR" kee="othergroup:artifact:org.sonar" qualifier="PAC" name="org.sonar"
-            root_id="2"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <!-- the project -->
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <!-- the project snapshot -->
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="0" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ"
-             qualifier="TRK" root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U"
-             ISLAST="false" path=""/>
-
-  <!-- conflicting snapshots -->
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="0" id="2" created_at="2007-10-02 13:58:00.00" version="2.0" project_id="1" scope="PRJ"
-             qualifier="TRK" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U"
-             ISLAST="false" path=""/>
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="1" id="3" created_at="2007-10-02 13:58:00.00" version="[null]" project_id="2" scope="DIR"
-             qualifier="PAC" root_project_id="1" root_snapshot_id="2" parent_snapshot_id="2" STATUS="U"
-             ISLAST="false"
-             path="3."/>
-
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotCacheDatabaseMeasures-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotCacheDatabaseMeasures-result.xml
deleted file mode 100644 (file)
index 62f6c56..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="1" VALUE="500" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotCacheDatabaseMeasures.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotCacheDatabaseMeasures.xml
deleted file mode 100644 (file)
index 4db7b1e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotPersistInMemoryMeasures-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotPersistInMemoryMeasures-result.xml
deleted file mode 100644 (file)
index 70818fb..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <metrics id="2" NAME="coverage" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-
-  <!-- other measure, just to avoid dbunit to fail -->
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="1" VALUE="100" METRIC_ID="2" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotPersistInMemoryMeasures.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotPersistInMemoryMeasures.xml
deleted file mode 100644 (file)
index 70818fb..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <metrics id="2" NAME="coverage" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-
-  <!-- other measure, just to avoid dbunit to fail -->
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="1" VALUE="100" METRIC_ID="2" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveExcludedResources-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveExcludedResources-result.xml
deleted file mode 100644 (file)
index 4db7b1e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveExcludedResources.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveExcludedResources.xml
deleted file mode 100644 (file)
index 4db7b1e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveOptimizedBestValues-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveOptimizedBestValues-result.xml
deleted file mode 100644 (file)
index 7eb348e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true"  hidden="false"/>
-  <metrics id="2" NAME="blocker_violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true"  hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
-             depth="1"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="12" scope="FIL" qualifier="CLA"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="2" STATUS="U" ISLAST="false" path="1.2."
-             depth="2"/>
-
-  <!-- violations on file -->
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="1" VALUE="60" METRIC_ID="1" SNAPSHOT_ID="3" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveOptimizedBestValues.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/doNotSaveOptimizedBestValues.xml
deleted file mode 100644 (file)
index a8507ea..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false" />
-  <metrics id="2" NAME="blocker_violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false" />
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveDependency-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveDependency-result.xml
deleted file mode 100644 (file)
index 6f85d74..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<dataset>
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar.source" qualifier="PAC"
-            name="org.sonar.source"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="12" scope="DIR" kee="group:artifact:org.sonar.target" qualifier="PAC"
-            name="org.sonar.target"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false"
-             path="1."
-             depth="1"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="12" scope="DIR" qualifier="PAC"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false"
-             path="1."
-             depth="1"/>
-
-
-  <dependencies id="1" from_resource_id="11" from_snapshot_id="2" to_resource_id="12" to_snapshot_id="3"
-                parent_dependency_id="[null]" project_snapshot_id="1"
-                dep_usage="INHERITS" dep_weight="3" />
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveDependency.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveDependency.xml
deleted file mode 100644 (file)
index 3a5ea27..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<dataset>
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar.source" qualifier="PAC"
-            name="org.sonar.source"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="12" scope="DIR" kee="group:artifact:org.sonar.target" qualifier="PAC"
-            name="org.sonar.target"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveMeasureOnExistingResource-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveMeasureOnExistingResource-result.xml
deleted file mode 100644 (file)
index 2de61e4..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-  <metrics id="2" NAME="other" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar" qualifier="PAC" name="org.sonar"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
-             depth="1"/>
-
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="1" VALUE="200" METRIC_ID="1" SNAPSHOT_ID="2" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveMeasureOnExistingResource.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveMeasureOnExistingResource.xml
deleted file mode 100644 (file)
index 3e99318..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-  <metrics id="2" NAME="other" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar" qualifier="PAC" name="org.sonar"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveOptimizedBestValuesIfOptionalFields-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveOptimizedBestValuesIfOptionalFields-result.xml
deleted file mode 100644 (file)
index 1ae0fc8..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true"  hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
-             depth="1"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="12" scope="FIL" qualifier="CLA"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="2" STATUS="U" ISLAST="false" path="1.2."
-             depth="2"/>
-
-  <!-- violations with default value. It's saved because tendency is set -->
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="1" VALUE="0" METRIC_ID="1" SNAPSHOT_ID="3" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="1" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveOptimizedBestValuesIfOptionalFields.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveOptimizedBestValuesIfOptionalFields.xml
deleted file mode 100644 (file)
index a5d9ea3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false" />
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveProjectMeasure-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveProjectMeasure-result.xml
deleted file mode 100644 (file)
index 62f6c56..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="1" VALUE="500" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveProjectMeasure.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveProjectMeasure.xml
deleted file mode 100644 (file)
index 4db7b1e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourceTree-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourceTree-result.xml
deleted file mode 100644 (file)
index 2db0a3b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
-            root_id="10"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
-             depth="1"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="12" scope="FIL" qualifier="CLA"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="2" STATUS="U" ISLAST="false" path="1.2."
-             depth="2"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourceTree.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourceTree.xml
deleted file mode 100644 (file)
index af8e184..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourcesBeforeBuildingDependencies.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveResourcesBeforeBuildingDependencies.xml
deleted file mode 100644 (file)
index 77dcdba..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<dataset>
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveRuleMeasures-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveRuleMeasures-result.xml
deleted file mode 100644 (file)
index be6cd1f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" rule_priority="3"
-                    alert_text="[null]" id="1" VALUE="500" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-
-  <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
-                    rule_priority="[null]"
-                    alert_text="[null]" id="2" VALUE="200" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
-                    RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
-                    alert_status="[null]" description="[null]"/>
-
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveRuleMeasures.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/saveRuleMeasures.xml
deleted file mode 100644 (file)
index 8e2311c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/updateExistingResourceFields-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/updateExistingResourceFields-result.xml
deleted file mode 100644 (file)
index eb01f29..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="DIR" qualifier="PAC" kee="group:artifact:org.foo" name="org.foo"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
-             root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
-             depth="1"/>
-
-</dataset>
\ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/updateExistingResourceFields.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultSensorContextTest/updateExistingResourceFields.xml
deleted file mode 100644 (file)
index d72c282..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<dataset>
-  <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]"  domain="[null]" short_name=""
-           enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
-  <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
-            root_id="[null]"
-            description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <projects long_name="[null]" id="11" scope="FOO" qualifier="BAR" kee="group:artifact:org.foo" name="org.foo"
-            root_id="[null]"
-            description="[null]" enabled="false" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-  <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
-             root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
-             path=""
-             depth="0"/>
-
-</dataset>
\ No newline at end of file
index 257b52b90ab27e0edce6b503c342df25abc66504..d0fcc390deaa96ad156f20a12a32efce950bf1dd 100644 (file)
@@ -21,6 +21,7 @@ package org.sonar.api.utils;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.SystemUtils;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -38,12 +39,12 @@ import java.util.Properties;
 import static org.hamcrest.Matchers.greaterThan;
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
 import static org.junit.internal.matchers.StringContains.containsString;
 import static org.mockito.Matchers.anyObject;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-@Ignore("Temporarily deactivated because it sometimes freezes on Windows")
 public class HttpDownloaderTest {
 
   private static ServletTester tester;
@@ -51,6 +52,8 @@ public class HttpDownloaderTest {
 
   @BeforeClass
   public static void startServer() throws Exception {
+    assumeThat(SystemUtils.IS_OS_WINDOWS, is(false)); // Temporarily deactivated on Windows because of frequent freezes
+
     tester = new ServletTester();
     tester.setContextPath("/");
     tester.addServlet(RedirectServlet.class, "/redirect/");