1 /** 2 * Copyright 2011-2012 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.maven.plugins.jenkins.helper; 17 18 import org.junit.Test; 19 20 public class RsyncHelperTest { 21 // private static final Logger logger = LoggerFactory.getLogger(RsyncHelperTest.class); 22 RsyncHelper helper = new RsyncHelper(); 23 24 @Test 25 public void testGetTargetDirectoriesQuickly() { 26 /* 27 File basedir = new File("/Users/jeffcaddel/ws/rice-2.1"); 28 long now = System.currentTimeMillis(); 29 List<File> excludeDirs = helper.getMatchingDirs(basedir, basedir, "/target", new DirectoryFileFilter()); 30 long elapsed = System.currentTimeMillis() - now; 31 logger.info("Elapsed: " + elapsed); 32 List<String> excludes = helper.getExcludesList(basedir, excludeDirs); 33 StringBuilder sb = new StringBuilder(); 34 for (String exclude : excludes) { 35 sb.append(exclude + "\n"); 36 } 37 File rsyncExcludes = new File("/Users/jeffcaddel/ws/rsync-excludes"); 38 try { 39 logger.info("Creating " + rsyncExcludes); 40 FileUtils.write(rsyncExcludes, sb.toString()); 41 } catch (IOException e) { 42 e.printStackTrace(); 43 }*/ 44 45 } 46 }