use of org.apache.ignite.internal.processors.igfs.IgfsImpl in project ignite by apache.
the class IgfsFragmentizerSelfTest method testDeleteFragmentizing.
/**
* @throws Exception If failed.
*/
public void testDeleteFragmentizing() throws Exception {
IgfsImpl igfs = (IgfsImpl) grid(0).fileSystem("igfs");
for (int i = 0; i < 30; i++) {
IgfsPath path = new IgfsPath("/someFile" + i);
try (IgfsOutputStream out = igfs.create(path, true)) {
for (int j = 0; j < 5 * IGFS_GROUP_SIZE; j++) out.write(new byte[IGFS_BLOCK_SIZE]);
}
U.sleep(200);
}
igfs.clear();
GridTestUtils.retryAssert(log, 50, 100, new CA() {
@Override
public void apply() {
for (int i = 0; i < NODE_CNT; i++) {
IgniteEx g = grid(i);
GridCacheAdapter<Object, Object> cache = ((IgniteKernal) g).internalCache(g.igfsx("igfs").configuration().getDataCacheConfiguration().getName());
assertTrue("Data cache is not empty [keys=" + cache.keySet() + ", node=" + g.localNode().id() + ']', cache.isEmpty());
}
}
});
}
Aggregations