This is an automated email from the ASF dual-hosted git repository. mkhl pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push: new 30588947747 SOLR-16585: bypass empty update in the test (#1454) 30588947747 is described below commit 30588947747d81ff4a29677008bba26153b5f75a Author: Mikhail Khludnev <mkhlud...@users.noreply.github.com> AuthorDate: Tue Mar 14 09:45:50 2023 +0300 SOLR-16585: bypass empty update in the test (#1454) --- .../src/test/org/apache/solr/client/solrj/SolrExampleTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java index 3f5f82658de..b49199f5cd8 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java @@ -590,13 +590,15 @@ public abstract class SolrExampleTests extends SolrExampleTestsBase { doc.addField("name", "doc" + i); doc.addField("price", "" + i); docs.add(doc); - if (rarely()) { + if (rarely() && !docs.isEmpty()) { client.add(docs); client.commit(); docs.clear(); } } - client.add(docs); + if (!docs.isEmpty()) { + client.add(docs); + } if (random().nextBoolean()) { client.commit(); } else {