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");
}
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");
}
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));
}
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'");
}
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);
}
Aggregations