@Test public void shouldUpdateLastPositionOnFlush() { when(esClient.shouldFlush()).thenReturn(true); createAndOpenExporter(); final Record record = testHarness.export( r -> r.getMetadata() .setValueType(ValueType.WORKFLOW_INSTANCE) .setRecordType(RecordType.EVENT)); assertThat(testHarness.getController().getPosition()).isEqualTo(record.getPosition()); }
@Override public void export(final Record<?> record) { if (!indexTemplatesCreated) { createIndexTemplates(); } client.index(record); lastPosition = record.getPosition(); if (client.shouldFlush()) { flush(); } }
ElasticsearchExporter implements Exporter { @Override public void export(final Record<?> record) { if (!indexTemplatesCreated) { createIndexTemplates(); } client.index(record); lastPosition = record.getPosition(); if (client.shouldFlush()) { flush(); } } }
ElasticsearchExporter implements Exporter { @Override public void export(final Record<?> record) { if (!indexTemplatesCreated) { createIndexTemplates(); } client.index(record); lastPosition = record.getPosition(); if (client.shouldFlush()) { flush(); } }  }
ElasticsearchExporter implements Exporter { @Override public void export(final Record<?> record) { if (!indexTemplatesCreated) { createIndexTemplates(); } client.index(record); lastPosition = record.getPosition(); if (client.shouldFlush()) { flush(); } }  @Override void configure(final Context context); @Override void open(final Controller controller); @Override void close(); @Override void export(final Record<?> record); }
ElasticsearchExporter implements Exporter { @Override public void export(final Record<?> record) { if (!indexTemplatesCreated) { createIndexTemplates(); } client.index(record); lastPosition = record.getPosition(); if (client.shouldFlush()) { flush(); } }  @Override void configure(final Context context); @Override void open(final Controller controller); @Override void close(); @Override void export(final Record<?> record); static final String ZEEBE_RECORD_TEMPLATE_JSON; }