Repository: maven-surefire
Updated Branches:
  refs/heads/master ce3bdd506 -> ff4242952


investigating


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/ff424295
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/ff424295
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/ff424295

Branch: refs/heads/master
Commit: ff42429525d7ff58a807cca5ee0191b1d034f4ce
Parents: ce3bdd5
Author: Tibor17 <[email protected]>
Authored: Mon May 30 10:06:21 2016 +0200
Committer: Tibor17 <[email protected]>
Committed: Mon May 30 10:06:21 2016 +0200

----------------------------------------------------------------------
 .../apache/maven/surefire/its/jiras/Surefire1211JUnitTestNgIT.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/ff424295/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1211JUnitTestNgIT.java
----------------------------------------------------------------------
diff --git 
a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1211JUnitTestNgIT.java
 
b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1211JUnitTestNgIT.java
index a7cd803..330fb4d 100644
--- 
a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1211JUnitTestNgIT.java
+++ 
b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1211JUnitTestNgIT.java
@@ -1 +1 @@
-package org.apache.maven.surefire.its.jiras;
/*
 * 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.
 */

import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
import org.apache.maven.surefire.its.fixture.SurefireLauncher
 ;
import org.junit.Before;
import org.junit.Test;

import static java.lang.System.getProperty;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assume.assumeThat;

/**
 * @author <a href="mailto:[email protected]";>Tibor Digana (tibor17)</a>
 * @see {@linkplain https://jira.codehaus.org/browse/SUREFIRE-1211}
 * @since 2.19.1
 */
public class Surefire1211JUnitTestNgIT
        extends SurefireJUnit4IntegrationTestCase
{
    @Before
    public void before() {
        System.out.println( "java.specification.version: " + getProperty( 
"java.specification.version" ) );
        System.err.println( "java.specification.version: " + getProperty( 
"java.specification.version" ) );
    }

    @Test
    public void withJUnit()
    {
        System.out.println( "java.specification.version: " + getProperty( 
"java.specification.version" ) );
        assumeThat( "java.specification.version: ",
                          getPro
 perty( "java.specification.version" ), is( greaterThanOrEqualTo( "1.7" ) ) );

        unpack().threadCount( 1 )
                .executeTest()
                .verifyErrorFree( 2 );
    }

    @Test
    public void withoutJUnit()
    {
        assumeThat( "java.specification.version: ",
                          getProperty( "java.specification.version" ), is( 
greaterThanOrEqualTo( "1.7" ) ) );

        unpack().threadCount( 1 )
                .sysProp( "junit", "false" )
                .executeTest()
                .verifyErrorFree( 1 );
    }

    private SurefireLauncher unpack()
    {
        return unpack( "surefire-1211" );
    }
}
\ No newline at end of file
+package org.apache.maven.surefire.its.jiras;
/*
 * 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.
 */

import org.apache.maven.shared.utils.io.FileUtils;
import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
import org
 .apache.maven.surefire.its.fixture.SurefireLauncher;
import org.junit.Before;
import org.junit.Test;

import java.io.File;
import java.io.IOException;

import static java.lang.System.getProperty;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assume.assumeThat;

/**
 * @author <a href="mailto:[email protected]";>Tibor Digana (tibor17)</a>
 * @see {@linkplain https://jira.codehaus.org/browse/SUREFIRE-1211}
 * @since 2.19.1
 */
public class Surefire1211JUnitTestNgIT
        extends SurefireJUnit4IntegrationTestCase
{
    @Before
    public void before() throws IOException
    {
        File version = new File( "./target/Surefire1211JUnitTestNgIT.txt" );
        version.createNewFile();
        FileUtils.fileWrite( version, null, getProperty( 
"java.specification.version", "null" ) );

        version = new File( "./target/Surefire1211JUnitTestNgIT_.txt" );
        version.createNewFile();
        FileUtils.f
 ileWrite( version, null, getProperty( "java.version", "null" ) );

        System.out.println( "java.specification.version: " + getProperty( 
"java.specification.version" ) );
        System.err.println( "java.version: " + getProperty( "java.version" ) );
    }

    @Test
    public void withJUnit()
    {
        System.out.println( "java.specification.version: " + getProperty( 
"java.specification.version" ) );
        assumeThat( "java.specification.version: ",
                          getProperty( "java.specification.version" ), is( 
greaterThanOrEqualTo( "1.7" ) ) );

        unpack().threadCount( 1 )
                .executeTest()
                .verifyErrorFree( 2 );
    }

    @Test
    public void withoutJUnit()
    {
        assumeThat( "java.specification.version: ",
                          getProperty( "java.specification.version" ), is( 
greaterThanOrEqualTo( "1.7" ) ) );

        unpack().threadCount( 1 )
                .sysProp( "junit", "false" )
                .exe
 cuteTest()
                .verifyErrorFree( 1 );
    }

    private SurefireLauncher unpack()
    {
        return unpack( "surefire-1211" );
    }
}
\ No newline at end of file

Reply via email to