/*
 * Copyright (C) 2013 salesforce.com, inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.auraframework.impl.context;

import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.auraframework.adapter.ComponentLocationAdapter;
import org.auraframework.impl.AuraImplTestCase;
import org.auraframework.util.test.annotation.AuraTestLabels;

public class AuraRegistryProviderImplTest extends AuraImplTestCase {
    public AuraRegistryProviderImplTest(String name) {
        super(name);
    }

    private static class AuraRegistryProviderImplOverride extends AuraRegistryProviderImpl {
        public Collection<ComponentLocationAdapter> testGetAllComponentLocationAdapters() {
            return getAllComponentLocationAdapters();
        }
    }

    @AuraTestLabels("auraSanity")
    public void testAllRegistries() throws Exception {
        Collection<ComponentLocationAdapter> markupLocations;
        List<File> broken = new ArrayList<>();

        markupLocations = new AuraRegistryProviderImplOverride().testGetAllComponentLocationAdapters();
        for (ComponentLocationAdapter location : markupLocations) {
            if (location != null) {
                File file = location.getComponentSourceDir();
                if (file != null && (!file.canRead() || !file.canExecute() || !file.isDirectory())) {
                    broken.add(file);
                }
            }
        }
        if (broken.size() > 0) {
            StringBuffer sb = new StringBuffer("Missing Directories in registry path");
            for (File dead : broken) {
                sb.append(dead.getAbsolutePath());
                sb.append("\n");
            }
            fail(sb.toString());
        }
    }
}

@@ -901,30 +901,31 @@
 otation.
-AuraTestLabels
+UnAdaptableTest
 ;%0A%0Apubli
@@ -1079,132 +1079,91 @@
     
-private static class AuraRegistryProviderImplOverride extends AuraRegistryProviderImpl %7B%0A        public Collection%3CC
+// Stop running the test in SFDC integration build. The test includes all c
 omponent
 Loca
@@ -1162,167 +1162,154 @@
 nent
-L
+ l
 ocation
-Adapter%3E testGetAllComponentLocationAdapters() %7B%0A            return getAllComponentLocationAdapters();%0A        %7D%0A    %7D%0A%0A    @AuraTestLabels(%22auraSanity
+%0A    // adapters. It's often broke by other teams.%0A    @UnAdaptableTest(%22Prevent this test running with SFDC integration build. W-2820492
 %22)%0A 
@@ -1530,24 +1530,12 @@
 Impl
-Override().testG
+().g
 etAl

Move testAllRegistries from 02b to 02c.