mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 21:12:15 +00:00
remove workaround to rerun testSymlink with shorter link for S10,
and instead add (char) cast so original test uses right length for name. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29990 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
42b7360b9a
commit
da9acc9705
1 file changed
+2
-10
@@ -158,20 +158,12 @@ public class UtilTest extends TestCase {
|
||||
// test a long name
|
||||
StringBuilder buf = new StringBuilder(768);
|
||||
for( int i=0; i<768; i++)
|
||||
buf.append('0'+(i%10));
|
||||
buf.append((char)('0'+(i%10)));
|
||||
Util.createSymlink(d,buf.toString(),"x", l);
|
||||
|
||||
String log = baos.toString();
|
||||
if (log.length() > 0) {
|
||||
if (log.length() > 0)
|
||||
System.err.println("log output: " + log);
|
||||
if (log.contains("ln failed: 78" /*ENAMETOOLONG*/)) {
|
||||
buf.setLength(0);
|
||||
// Try again with shorter name for this system
|
||||
for( int i=0; i<254; i++)
|
||||
buf.append('0'+(i%10));
|
||||
Util.createSymlink(d,buf.toString(),"x", l);
|
||||
}
|
||||
}
|
||||
|
||||
assertEquals(buf.toString(),Util.resolveSymlink(new File(d,"x"),l));
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user