@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
  protected void checkSupplyContextMapIsEmpty() {
    for (Ignite g : G.allGrids()) {
      for (GridCacheAdapter c : ((IgniteEx) g).context().cache().internalCaches()) {

        Object supplier = U.field(c.preloader(), "supplier");

        Map map = U.field(supplier, "scMap");

        synchronized (map) {
          assert map.isEmpty();
        }
      }
    }
  }
Exemplo n.º 2
0
  private JdbcConnection connection() throws Exception {
    GridKernalContext ctx = ((IgniteEx) ignite).context();

    GridQueryProcessor qryProcessor = ctx.query();

    IgniteH2Indexing idx = U.field(qryProcessor, "idx");

    return (JdbcConnection) idx.connectionForSpace(null);
  }
  /** {@inheritDoc} */
  @Override
  protected void afterTestsStopped() throws Exception {
    super.afterTestsStopped();

    System.setProperty(IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER, "false");

    Properties props = U.field(IgniteProperties.class, "PROPS");

    props.setProperty("ignite.update.status.params", updateStatusParams);
  }
  /** {@inheritDoc} */
  @Override
  protected void beforeTestsStarted() throws Exception {
    super.beforeTestsStarted();

    System.setProperty(IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER, "true");

    Properties props = U.field(IgniteProperties.class, "PROPS");

    updateStatusParams = props.getProperty("ignite.update.status.params");

    props.setProperty(
        "ignite.update.status.params", "ver=" + IgniteProperties.get("ignite.version"));
  }