From 70e0012ec4a79af29381a4477328737c1d3b9e98 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Tue, 3 Apr 2018 15:28:48 -0400 Subject: [PATCH] [TEST][Monitoring] Remove Unneeded Assert (elastic/x-pack-elasticsearch#4284) This removes the `assert` that has been causing some very unexpected test failures due to unexpected threading issues. Some of the code changed and became async, so it is no longer guaranteed that the same thread calls `doFlush` and `doClose`. We could similarly make the field `volatile`, but since this `assert` is not really helping anything it's easier to remove it. Original commit: elastic/x-pack-elasticsearch@ba39de605f3ed35c11394aef5df8a55e0b621562 --- .../xpack/monitoring/exporter/http/HttpExportBulk.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java index ff9d9b786ba..5fea82bd001 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java @@ -123,8 +123,6 @@ class HttpExportBulk extends ExportBulk { @Override protected void doClose(ActionListener listener) { - // nothing serious to do at this stage - assert payload == null; listener.onResponse(null); }