Search in sources :

Example 51 with Disabled

use of org.junit.jupiter.api.Disabled in project jgnash by ccavanaugh.

the class YahooEventParserTest method testParser.

@SuppressWarnings("ConstantConditions")
@Test
// disable on Travis-CI
@DisabledIfEnvironmentVariable(named = "CI", matches = "true")
@Disabled
void testParser() throws IOException {
    if (System.getenv(GITHUB_ACTION) != null) {
        // don't test with Github actions
        return;
    }
    for (int i = 0; i < ATTEMPTS; i++) {
        // try multiple times to pass
        final SecurityNode ibm = new SecurityNode(e.getDefaultCurrency());
        ibm.setSymbol("IBM");
        ibm.setScale((byte) 2);
        ibm.setQuoteSource(QuoteSource.YAHOO);
        final SecurityHistoryNode historyNode = new SecurityHistoryNode(LocalDate.of(1962, Month.JANUARY, 1), BigDecimal.TEN, 1000, BigDecimal.TEN, BigDecimal.TEN);
        e.addSecurity(ibm);
        e.addSecurityHistory(ibm, historyNode);
        QuoteSource quoteSource = ibm.getQuoteSource();
        Objects.requireNonNull(quoteSource);
        SecurityParser securityParser = quoteSource.getParser();
        Objects.requireNonNull(securityParser);
        final Set<SecurityHistoryEvent> events = securityParser.retrieveHistoricalEvents(ibm, LocalDate.of(2015, Month.AUGUST, 22));
        assertNotNull(events);
        // size fluctuates
        if (events.size() <= 221 && events.size() >= 220) {
            assertTrue(events.size() <= 221 && events.size() >= 220);
            return;
        }
    }
    fail("Failed to pass test");
}
Also used : SecurityNode(jgnash.engine.SecurityNode) SecurityHistoryNode(jgnash.engine.SecurityHistoryNode) QuoteSource(jgnash.engine.QuoteSource) SecurityParser(jgnash.net.security.SecurityParser) SecurityHistoryEvent(jgnash.engine.SecurityHistoryEvent) AbstractEngineTest(jgnash.engine.AbstractEngineTest) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled) DisabledIfEnvironmentVariable(org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable)

Example 52 with Disabled

use of org.junit.jupiter.api.Disabled in project jgnash by ccavanaugh.

the class YahooEventParserTest method testHistoricalDownload.

@Test
// disable on Travis-CI
@DisabledIfEnvironmentVariable(named = "CI", matches = "true")
@Disabled
void testHistoricalDownload() throws IOException {
    if (System.getenv(GITHUB_ACTION) != null) {
        // don't test with Github actions
        return;
    }
    for (int i = 0; i < ATTEMPTS; i++) {
        // try multiple times to pass
        final SecurityNode ibm = new SecurityNode(e.getDefaultCurrency());
        ibm.setSymbol("IBM");
        ibm.setScale((byte) 2);
        e.addSecurity(ibm);
        // force re-authorization to prevent failed unit test
        YahooCrumbManager.clearAuthorization();
        final List<SecurityHistoryNode> events = Objects.requireNonNull(QuoteSource.YAHOO.getParser()).retrieveHistoricalPrice(ibm, LocalDate.of(2016, Month.JANUARY, 1), LocalDate.of(2016, Month.DECEMBER, 30));
        if (events.size() == 252) {
            assertEquals(252, events.size());
            return;
        }
    }
    fail("Failed to pass test");
}
Also used : SecurityNode(jgnash.engine.SecurityNode) SecurityHistoryNode(jgnash.engine.SecurityHistoryNode) AbstractEngineTest(jgnash.engine.AbstractEngineTest) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled) DisabledIfEnvironmentVariable(org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable)

Example 53 with Disabled

use of org.junit.jupiter.api.Disabled in project spring-boot by spring-projects.

the class IncrementalBuildMetadataGenerationTests method incrementalBuildTypeRenamed.

@Test
@Disabled("gh-26271")
void incrementalBuildTypeRenamed() throws Exception {
    TestProject project = new TestProject(this.tempDir, FooProperties.class, BarProperties.class);
    ConfigurationMetadata metadata = project.fullBuild();
    assertThat(metadata).has(Metadata.withProperty("foo.counter").fromSource(FooProperties.class).withDefaultValue(0));
    assertThat(metadata).has(Metadata.withProperty("bar.counter").fromSource(BarProperties.class).withDefaultValue(0));
    assertThat(metadata).doesNotHave(Metadata.withProperty("bar.counter").fromSource(RenamedBarProperties.class));
    project.delete(BarProperties.class);
    project.add(RenamedBarProperties.class);
    metadata = project.incrementalBuild(RenamedBarProperties.class);
    assertThat(metadata).has(Metadata.withProperty("foo.counter").fromSource(FooProperties.class).withDefaultValue(0));
    assertThat(metadata).doesNotHave(Metadata.withProperty("bar.counter").fromSource(BarProperties.class).withDefaultValue(0));
    assertThat(metadata).has(Metadata.withProperty("bar.counter").withDefaultValue(0).fromSource(RenamedBarProperties.class));
}
Also used : RenamedBarProperties(org.springframework.boot.configurationsample.incremental.RenamedBarProperties) ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Example 54 with Disabled

use of org.junit.jupiter.api.Disabled in project spring-boot by spring-projects.

the class InvalidConfigDataPropertyExceptionTests method throwOrWarnWhenHasInvalidPropertyThrowsException.

@Test
@Disabled("Disabled until spring.profiles support is dropped")
void throwOrWarnWhenHasInvalidPropertyThrowsException() {
    MockPropertySource propertySource = new MockPropertySource();
    propertySource.setProperty("spring.profiles", "a");
    ConfigDataEnvironmentContributor contributor = ConfigDataEnvironmentContributor.ofExisting(propertySource);
    assertThatExceptionOfType(InvalidConfigDataPropertyException.class).isThrownBy(() -> InvalidConfigDataPropertyException.throwOrWarn(this.logger, contributor)).withMessageStartingWith("Property 'spring.profiles' is invalid and should be replaced with " + "'spring.config.activate.on-profile'");
}
Also used : MockPropertySource(org.springframework.mock.env.MockPropertySource) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Example 55 with Disabled

use of org.junit.jupiter.api.Disabled in project robo4j by Robo4J.

the class RaycastTest method testMisbehavingData.

@Disabled("08.09.17 we enable it when it works :)")
@Test
void testMisbehavingData() {
    ScanResultImpl scan = new ScanResultImpl(1.0f, new Predicate<Point2f>() {

        @Override
        public boolean test(Point2f t) {
            return t.getRange() >= 0.08;
        }
    });
    scan.addPoint(Point2f.fromPolar(2.2f, 35.5f));
    scan.addPoint(Point2f.fromPolar(2.2f, 34.5f));
    scan.addPoint(Point2f.fromPolar(2.3f, 33.5f));
    scan.addPoint(Point2f.fromPolar(2.0f, 32.5f));
    scan.addPoint(Point2f.fromPolar(1.9f, 31.5f));
    scan.addPoint(Point2f.fromPolar(1.8f, 30.5f));
    scan.addPoint(Point2f.fromPolar(3.7f, 29.5f));
    scan.addPoint(Point2f.fromPolar(3.8f, 28.5f));
    scan.addPoint(Point2f.fromPolar(2.3f, 27.5f));
    scan.addPoint(Point2f.fromPolar(3.3f, 26.5f));
    scan.addPoint(Point2f.fromPolar(4.2f, 25.5f));
    scan.addPoint(Point2f.fromPolar(3.9f, 24.5f));
    scan.addPoint(Point2f.fromPolar(3.1f, 23.5f));
    scan.addPoint(Point2f.fromPolar(3.7f, 22.5f));
    scan.addPoint(Point2f.fromPolar(3.6f, 21.5f));
    scan.addPoint(Point2f.fromPolar(3.4f, 20.5f));
    scan.addPoint(Point2f.fromPolar(3.3f, 19.5f));
    scan.addPoint(Point2f.fromPolar(3.1f, 18.5f));
    scan.addPoint(Point2f.fromPolar(3.0f, 17.5f));
    scan.addPoint(Point2f.fromPolar(2.8f, 16.5f));
    scan.addPoint(Point2f.fromPolar(2.8f, 15.5f));
    scan.addPoint(Point2f.fromPolar(2.8f, 14.5f));
    scan.addPoint(Point2f.fromPolar(2.8f, 13.5f));
    scan.addPoint(Point2f.fromPolar(2.8f, 12.5f));
    scan.addPoint(Point2f.fromPolar(2.8f, 11.5f));
    scan.addPoint(Point2f.fromPolar(2.9f, 10.5f));
    scan.addPoint(Point2f.fromPolar(2.9f, 9.5f));
    scan.addPoint(Point2f.fromPolar(2.9f, 8.5f));
    scan.addPoint(Point2f.fromPolar(2.9f, 7.5f));
    scan.addPoint(Point2f.fromPolar(2.9f, 6.5f));
    scan.addPoint(Point2f.fromPolar(2.8f, 5.5f));
    scan.addPoint(Point2f.fromPolar(2.7f, 4.5f));
    scan.addPoint(Point2f.fromPolar(2.7f, 3.5f));
    scan.addPoint(Point2f.fromPolar(2.6f, 2.5f));
    scan.addPoint(Point2f.fromPolar(2.6f, 1.5f));
    scan.addPoint(Point2f.fromPolar(2.5f, 0.5f));
    scan.addPoint(Point2f.fromPolar(2.4f, -0.5f));
    scan.addPoint(Point2f.fromPolar(2.4f, -1.5f));
    scan.addPoint(Point2f.fromPolar(2.4f, -2.5f));
    scan.addPoint(Point2f.fromPolar(2.5f, -3.5f));
    scan.addPoint(Point2f.fromPolar(2.5f, -4.5f));
    scan.addPoint(Point2f.fromPolar(3.0f, -5.5f));
    scan.addPoint(Point2f.fromPolar(3.2f, -6.5f));
    scan.addPoint(Point2f.fromPolar(3.2f, -7.5f));
    scan.addPoint(Point2f.fromPolar(3.4f, -8.5f));
    scan.addPoint(Point2f.fromPolar(3.4f, -9.5f));
    scan.addPoint(Point2f.fromPolar(3.5f, -10.5f));
    scan.addPoint(Point2f.fromPolar(3.4f, -11.5f));
    scan.addPoint(Point2f.fromPolar(3.5f, -12.5f));
    scan.addPoint(Point2f.fromPolar(3.4f, -13.5f));
    scan.addPoint(Point2f.fromPolar(3.4f, -14.5f));
    scan.addPoint(Point2f.fromPolar(3.4f, -15.5f));
    scan.addPoint(Point2f.fromPolar(3.3f, -16.5f));
    scan.addPoint(Point2f.fromPolar(3.3f, -17.5f));
    scan.addPoint(Point2f.fromPolar(3.2f, -18.5f));
    scan.addPoint(Point2f.fromPolar(3.2f, -19.5f));
    scan.addPoint(Point2f.fromPolar(3.2f, -20.5f));
    scan.addPoint(Point2f.fromPolar(3.2f, -21.5f));
    scan.addPoint(Point2f.fromPolar(3.1f, -22.5f));
    scan.addPoint(Point2f.fromPolar(3.1f, -23.5f));
    FeatureSet features = FeatureExtraction.getFeatures(scan.getPoints(), 1.0f);
    assertNotNull(features);
    // FIXME: Remove the next two lines when the test is properly fixed.
    assertNotEquals(DELTA, 0);
    assertNotNull(ORIGO);
    Point2f promisingPoint = Raycast.raycastFarthestPoint(scan.getPoints(), 0.4f, 0.3f, features);
    assertNotNull(promisingPoint);
// assertNotEquals(ORIGO.getX(), promisingPoint.getX(), DELTA);
// assertNotEquals(ORIGO.getY(), promisingPoint.getY(), DELTA);
}
Also used : Point2f(com.robo4j.math.geometry.Point2f) ScanResultImpl(com.robo4j.math.geometry.impl.ScanResultImpl) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Aggregations

Disabled (org.junit.jupiter.api.Disabled)228 Test (org.junit.jupiter.api.Test)214 File (java.io.File)13 TransactionalIntegrationTest (org.hisp.dhis.TransactionalIntegrationTest)13 NoGood (at.ac.tuwien.kr.alpha.core.common.NoGood)10 ArrayList (java.util.ArrayList)10 HashMap (java.util.HashMap)9 NAR (nars.NAR)9 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)9 BaseDataTest (org.apache.ibatis.BaseDataTest)8 TestNAR (nars.test.TestNAR)7 URL (org.apache.dubbo.common.URL)7 SqlSession (org.apache.ibatis.session.SqlSession)7 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)7 AnswerSet (at.ac.tuwien.kr.alpha.api.AnswerSet)6 ASPCore2Program (at.ac.tuwien.kr.alpha.api.programs.ASPCore2Program)6 FieldValueModel (com.synopsys.integration.alert.common.rest.model.FieldValueModel)6 IntegrationPerformanceTestRunner (com.synopsys.integration.alert.performance.utility.IntegrationPerformanceTestRunner)6 List (java.util.List)6 RectDouble2D (jcog.tree.rtree.rect.RectDouble2D)6