Author: kkolinko
Date: Mon May 12 02:29:18 2014
New Revision: 1593880

URL: http://svn.apache.org/r1593880
Log:
Fix tests failing at Buildbot and make them more friendly to Git.

Buildbot uses Subversion 1.6 (or earlier). Thus there are .svn directories 
everywhere in the source tree, which caused failure of webresources tests.

Added:
    tomcat/trunk/test/webresources/dir2/d1/.ignore-me.txt   (with props)
    tomcat/trunk/test/webresources/dir2/d2/.ignore-me.txt   (with props)
    tomcat/trunk/test/webresources/dir3/.ignore-me.txt   (with props)
Modified:
    
tomcat/trunk/test/org/apache/catalina/webresources/AbstractTestResourceSet.java

Modified: 
tomcat/trunk/test/org/apache/catalina/webresources/AbstractTestResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/webresources/AbstractTestResourceSet.java?rev=1593880&r1=1593879&r2=1593880&view=diff
==============================================================================
--- 
tomcat/trunk/test/org/apache/catalina/webresources/AbstractTestResourceSet.java 
(original)
+++ 
tomcat/trunk/test/org/apache/catalina/webresources/AbstractTestResourceSet.java 
Mon May 12 02:29:18 2014
@@ -175,8 +175,15 @@ public abstract class AbstractTestResour
         expected.add("f1.txt");
         expected.add("f2.txt");
 
+        // Directories created by Subversion 1.6 and earlier clients
+        Set<String> optional = new HashSet<>();
+        optional.add(".svn");
+        // Files visible in some tests only
+        optional.add(getMount() + ".ignore-me.txt");
+
         for (String result : results) {
-            Assert.assertTrue(result, expected.remove(result));
+            Assert.assertTrue(result,
+                    expected.remove(result) || optional.remove(result));
         }
         Assert.assertEquals(0, expected.size());
     }
@@ -188,8 +195,15 @@ public abstract class AbstractTestResour
         Set<String> expected = new HashSet<>();
         expected.add("d1-f1.txt");
 
+        // Directories created by Subversion 1.6 and earlier clients
+        Set<String> optional = new HashSet<>();
+        optional.add(".svn");
+        // Files visible in some tests only
+        optional.add(".ignore-me.txt");
+
         for (String result : results) {
-            Assert.assertTrue(result, expected.remove(result));
+            Assert.assertTrue(result,
+                    expected.remove(result) || optional.remove(result));
         }
         Assert.assertEquals(0, expected.size());
     }
@@ -201,8 +215,15 @@ public abstract class AbstractTestResour
         Set<String> expected = new HashSet<>();
         expected.add("d1-f1.txt");
 
+        // Directories created by Subversion 1.6 and earlier clients
+        Set<String> optional = new HashSet<>();
+        optional.add(".svn");
+        // Files visible in some tests only
+        optional.add(".ignore-me.txt");
+
         for (String result : results) {
-            Assert.assertTrue(result, expected.remove(result));
+            Assert.assertTrue(result,
+                    expected.remove(result) || optional.remove(result));
         }
         Assert.assertEquals(0, expected.size());
     }
@@ -247,8 +268,15 @@ public abstract class AbstractTestResour
         expected.add(getMount() + "/f1.txt");
         expected.add(getMount() + "/f2.txt");
 
+        // Directories created by Subversion 1.6 and earlier clients
+        Set<String> optional = new HashSet<>();
+        optional.add(getMount() + "/.svn/");
+        // Files visible in some tests only
+        optional.add(getMount() + "/.ignore-me.txt");
+
         for (String result : results) {
-            Assert.assertTrue(result, expected.remove(result));
+            Assert.assertTrue(result,
+                    expected.remove(result) || optional.remove(result));
         }
         Assert.assertEquals(0, expected.size());
     }
@@ -260,8 +288,15 @@ public abstract class AbstractTestResour
         Set<String> expected = new HashSet<>();
         expected.add(getMount() + "/d1/d1-f1.txt");
 
+        // Directories created by Subversion 1.6 and earlier clients
+        Set<String> optional = new HashSet<>();
+        optional.add(getMount() + "/d1/.svn/");
+        // Files visible in some tests only
+        optional.add(getMount() + "/d1/.ignore-me.txt");
+
         for (String result : results) {
-            Assert.assertTrue(result, expected.remove(result));
+            Assert.assertTrue(result,
+                    expected.remove(result) || optional.remove(result));
         }
         Assert.assertEquals(0, expected.size());
     }
@@ -273,8 +308,15 @@ public abstract class AbstractTestResour
         Set<String> expected = new HashSet<>();
         expected.add(getMount() + "/d1/d1-f1.txt");
 
+        // Directories created by Subversion 1.6 and earlier clients
+        Set<String> optional = new HashSet<>();
+        optional.add(getMount() + "/d1/.svn/");
+        // Files visible in some tests only
+        optional.add(getMount() + "/d1/.ignore-me.txt");
+
         for (String result : results) {
-            Assert.assertTrue(result, expected.remove(result));
+            Assert.assertTrue(result,
+                    expected.remove(result) || optional.remove(result));
         }
         Assert.assertEquals(0, expected.size());
     }

Added: tomcat/trunk/test/webresources/dir2/d1/.ignore-me.txt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webresources/dir2/d1/.ignore-me.txt?rev=1593880&view=auto
==============================================================================
--- tomcat/trunk/test/webresources/dir2/d1/.ignore-me.txt (added)
+++ tomcat/trunk/test/webresources/dir2/d1/.ignore-me.txt Mon May 12 02:29:18 
2014
@@ -0,0 +1,21 @@
+# -----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+# -----------------------------------------------------------------------------
+
+This file is added here so that the directory is not empty and does not
+disappear in Git.
+Whether it is visible in AbstractTestResourceSet tests, depends on
+configuration of mappings in specific test. Thus it is optional.

Propchange: tomcat/trunk/test/webresources/dir2/d1/.ignore-me.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/trunk/test/webresources/dir2/d2/.ignore-me.txt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webresources/dir2/d2/.ignore-me.txt?rev=1593880&view=auto
==============================================================================
--- tomcat/trunk/test/webresources/dir2/d2/.ignore-me.txt (added)
+++ tomcat/trunk/test/webresources/dir2/d2/.ignore-me.txt Mon May 12 02:29:18 
2014
@@ -0,0 +1,21 @@
+# -----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+# -----------------------------------------------------------------------------
+
+This file is added here so that the directory is not empty and does not
+disappear in Git.
+Whether it is visible in AbstractTestResourceSet tests, depends on
+configuration of mappings in specific test. Thus it is optional.

Propchange: tomcat/trunk/test/webresources/dir2/d2/.ignore-me.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/trunk/test/webresources/dir3/.ignore-me.txt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webresources/dir3/.ignore-me.txt?rev=1593880&view=auto
==============================================================================
--- tomcat/trunk/test/webresources/dir3/.ignore-me.txt (added)
+++ tomcat/trunk/test/webresources/dir3/.ignore-me.txt Mon May 12 02:29:18 2014
@@ -0,0 +1,21 @@
+# -----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+# -----------------------------------------------------------------------------
+
+This file is added here so that the directory is not empty and does not
+disappear in Git.
+Whether it is visible in AbstractTestResourceSet tests, depends on
+configuration of mappings in specific test. Thus it is optional.

Propchange: tomcat/trunk/test/webresources/dir3/.ignore-me.txt
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to