use of org.junit.jupiter.api.Disabled in project neo4j by neo4j.
the class FulltextIndexConsistencyCheckIT method mustDiscoverNodeInIndexMissingFromStore.
@Disabled("Turns out that this is not something that the consistency checker actually looks for, currently. " + "The test is disabled until the consistency checker is extended with checks that will discover this sort of inconsistency.")
@Test
void mustDiscoverNodeInIndexMissingFromStore() throws Exception {
GraphDatabaseService db = createDatabase();
try (Transaction tx = db.beginTx()) {
tx.execute(format(NODE_CREATE, "nodes", asStrList("Label"), asStrList("prop"))).close();
tx.commit();
}
long nodeId;
try (Transaction tx = db.beginTx()) {
tx.schema().awaitIndexesOnline(2, TimeUnit.MINUTES);
Node node = tx.createNode(Label.label("Label"));
nodeId = node.getId();
node.setProperty("prop", "value");
tx.commit();
}
// Remove the property without updating the index
managementService.shutdown();
DatabaseManagementService managementService = new TestDatabaseManagementServiceBuilder(databaseLayout).setFileSystem(fs).removeExtensions(INDEX_PROVIDERS_FILTER).addExtension(new FailingGenericNativeIndexProviderFactory(SKIP_ONLINE_UPDATES)).addExtension(new TokenIndexProviderFactory()).build();
db = managementService.database(DEFAULT_DATABASE_NAME);
try (Transaction tx = db.beginTx()) {
tx.getNodeById(nodeId).removeProperty("prop");
tx.commit();
}
managementService.shutdown();
ConsistencyCheckService.Result result = checkConsistency();
assertFalse(result.isSuccessful());
}
use of org.junit.jupiter.api.Disabled in project neo4j by neo4j.
the class IndexConfigMigrationIT method create3_5Database.
@Disabled("Here as reference for how 3.5 db was created")
@Test
void create3_5Database() throws Exception {
Path storeDir = tempStoreDirectory();
DatabaseManagementServiceBuilder builder = new TestDatabaseManagementServiceBuilder(storeDir);
setSpatialConfig(builder);
DatabaseManagementService dbms = builder.build();
GraphDatabaseService db = dbms.database(DEFAULT_DATABASE_NAME);
createIndex(db, NATIVE_BTREE10.providerName(), label1);
// createIndex( db, NATIVE20.providerName(), label2 ); // <- Those index providers are removed in 4.0, but here for reference.
// createIndex( db, NATIVE10.providerName(), label3 );
// createIndex( db, LUCENE10.providerName(), label4 );
createSpatialData(db, label1, label2, label3, label4);
for (FulltextIndexDescription fulltextIndex : FulltextIndexDescription.values()) {
createFulltextIndex(db, fulltextIndex.indexProcedure, fulltextIndex.indexName, fulltextIndex.tokenName, propKey, fulltextIndex.configMap);
}
dbms.shutdown();
Path zipFile = storeDir.resolveSibling(storeDir.getFileName().toString() + ".zip");
ZipUtils.zip(new DefaultFileSystemAbstraction(), storeDir, zipFile);
System.out.println("Db created in " + zipFile.toAbsolutePath());
}
use of org.junit.jupiter.api.Disabled in project spring-framework by spring-projects.
the class StreamingSimpleClientHttpRequestFactoryTests method largeFileUpload.
@Test
@Disabled
public void largeFileUpload() throws Exception {
Random rnd = new Random();
ClientHttpResponse response = null;
try {
ClientHttpRequest request = factory.createRequest(new URI(baseUrl + "/methods/post"), HttpMethod.POST);
final int BUF_SIZE = 4096;
final int ITERATIONS = Integer.MAX_VALUE / BUF_SIZE;
// final int contentLength = ITERATIONS * BUF_SIZE;
// request.getHeaders().setContentLength(contentLength);
OutputStream body = request.getBody();
for (int i = 0; i < ITERATIONS; i++) {
byte[] buffer = new byte[BUF_SIZE];
rnd.nextBytes(buffer);
body.write(buffer);
}
response = request.execute();
assertThat(response.getStatusCode()).as("Invalid response status").isEqualTo(HttpStatus.OK);
} finally {
if (response != null) {
response.close();
}
}
}
use of org.junit.jupiter.api.Disabled in project netty by netty.
the class DnsNameResolverClientSubnetTest method testSubnetQuery.
// See https://www.gsic.uva.es/~jnisigl/dig-edns-client-subnet.html
// Ignore as this needs to query real DNS servers.
@Disabled
@Test
public void testSubnetQuery() throws Exception {
EventLoopGroup group = new NioEventLoopGroup(1);
DnsNameResolver resolver = newResolver(group).build();
try {
// Same as:
// # /.bind-9.9.3-edns/bin/dig @ns1.google.com www.google.es +client=157.88.0.0/24
Future<List<InetAddress>> future = resolver.resolveAll("www.google.es", Collections.<DnsRecord>singleton(// 157.88.0.0 / 24
new DefaultDnsOptEcsRecord(1024, 24, SocketUtils.addressByName("157.88.0.0").getAddress())));
for (InetAddress address : future.syncUninterruptibly().getNow()) {
System.out.println(address);
}
} finally {
resolver.close();
group.shutdownGracefully(0, 0, TimeUnit.SECONDS);
}
}
use of org.junit.jupiter.api.Disabled in project netty by netty.
the class FileRegionThrottleTest method testGlobalWriteThrottle.
@Disabled("This test is flaky, need more investigation")
@Test
public void testGlobalWriteThrottle() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
final GlobalTrafficShapingHandler gtsh = new GlobalTrafficShapingHandler(group, WRITE_LIMIT, 0);
ServerBootstrap bs = new ServerBootstrap();
bs.group(group).channel(NioServerSocketChannel.class).childHandler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel ch) {
ch.pipeline().addLast(new LineBasedFrameDecoder(Integer.MAX_VALUE));
ch.pipeline().addLast(new MessageDecoder());
ch.pipeline().addLast(gtsh);
}
});
Channel sc = bs.bind(0).sync().channel();
Channel cc = clientConnect(sc.localAddress(), new ReadHandler(latch)).channel();
long start = TrafficCounter.milliSecondFromNano();
cc.writeAndFlush(Unpooled.copiedBuffer("send-file\n", CharsetUtil.US_ASCII)).sync();
latch.await();
long timeTaken = TrafficCounter.milliSecondFromNano() - start;
assertTrue(timeTaken > 3000, "Data streamed faster than expected");
sc.close().sync();
cc.close().sync();
}
Aggregations