Sorry that was a bad forward port from branch_9x. Will fix.

- Houston

On Thu, Jul 17, 2025 at 3:52 AM Uwe Schindler <u...@thetaphi.de> wrote:

> Hi,
>
> this broke all jenkins builds while compiling RankFiekdTest:
>
> >*Task :solr:core:compileTestJava*
> /home/jenkins/jenkins-agent/workspace/Solr/Solr-Test-main/solr/core/src/test/org/apache/solr/schema/RankFieldTest.java:62:
> error: no suitable method found for error(no arguments)
>      try (LogListener errors = LogListener.error().substring("Expecting
> float")) {
>                                           ^
>      method LogListener.error(Class<?>) is not applicable
>        (actual and formal argument lists differ in length)
>      method LogListener.error(String) is not applicable
>        (actual and formal argument lists differ in length)
> /home/jenkins/jenkins-agent/workspace/Solr/Solr-Test-main/solr/core/src/test/org/apache/solr/schema/RankFieldTest.java:70:
> error: no suitable method found for error(no arguments)
>      try (LogListener errors = LogListener.error().substring("must be
> finite")) {
>                                           ^
>      method LogListener.error(Class<?>) is not applicable
>        (actual and formal argument lists differ in length)
>      method LogListener.error(String) is not applicable
>        (actual and formal argument lists differ in length)
> /home/jenkins/jenkins-agent/workspace/Solr/Solr-Test-main/solr/core/src/test/org/apache/solr/schema/RankFieldTest.java:80:
> error: no suitable method found for error(no arguments)
>      try (LogListener errors = LogListener.error().substring("must be a
> positive")) {
>                                           ^
>      method LogListener.error(Class<?>) is not applicable
>        (actual and formal argument lists differ in length)
>      method LogListener.error(String) is not applicable
>        (actual and formal argument lists differ in length)
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> 3 errors
>
> >*Task :solr:core:compileTestJava* FAILED
>
> Uwe
>
> Am 16.07.2025 um 19:55 schrieb hous...@apache.org:
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > houston pushed a commit to branch main
> > in repositoryhttps://gitbox.apache.org/repos/asf/solr.git
> >
> >
> > The following commit(s) were added to refs/heads/main by this push:
> >       new d88ba42e2a0 Use LogWatcher instead of ErrorLogMuter for
> RankFieldTest
> > d88ba42e2a0 is described below
> >
> > commit d88ba42e2a03a888b30b47989ef990a019191b63
> > Author: Houston Putman<hous...@apache.org>
> > AuthorDate: Wed Jul 16 10:55:32 2025 -0700
> >
> >      Use LogWatcher instead of ErrorLogMuter for RankFieldTest
> > ---
> >   solr/core/src/test/org/apache/solr/schema/RankFieldTest.java | 11
> +++++++----
> >   1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git
> a/solr/core/src/test/org/apache/solr/schema/RankFieldTest.java
> b/solr/core/src/test/org/apache/solr/schema/RankFieldTest.java
> > index cb354f1e398..3a4f1e48b5e 100644
> > --- a/solr/core/src/test/org/apache/solr/schema/RankFieldTest.java
> > +++ b/solr/core/src/test/org/apache/solr/schema/RankFieldTest.java
> > @@ -23,7 +23,7 @@ import org.apache.lucene.index.LeafReader;
> >   import org.apache.lucene.util.BytesRef;
> >   import org.apache.solr.SolrTestCaseJ4;
> >   import org.apache.solr.common.params.ModifiableSolrParams;
> > -import org.apache.solr.util.ErrorLogMuter;
> > +import org.apache.solr.util.LogListener;
> >   import org.apache.solr.util.TestHarness;
> >   import org.junit.BeforeClass;
> >   import org.junit.Ignore;
> > @@ -59,29 +59,32 @@ public class RankFieldTest extends SolrTestCaseJ4 {
> >     }
> >
> >     public void testBadFormat() {
> > -    try (ErrorLogMuter errors = ErrorLogMuter.substring("Expecting
> float")) {
> > +    try (LogListener errors = LogListener.error().substring("Expecting
> float")) {
> >         assertFailedU(adoc("id", "1", RANK_1, "foo"));
> >
> >         assertFailedU(adoc("id", "1", RANK_1, "1.2.3"));
> >         assertEquals(2, errors.getCount());
> > +      errors.clearQueue();
> >       }
> >
> > -    try (ErrorLogMuter errors = ErrorLogMuter.substring("must be
> finite")) {
> > +    try (LogListener errors = LogListener.error().substring("must be
> finite")) {
> >         assertFailedU(adoc("id", "1", RANK_1,
> Float.toString(Float.POSITIVE_INFINITY)));
> >
> >         assertFailedU(adoc("id", "1", RANK_1,
> Float.toString(Float.NEGATIVE_INFINITY)));
> >
> >         assertFailedU(adoc("id", "1", RANK_1,
> Float.toString(Float.NaN)));
> >         assertEquals(3, errors.getCount());
> > +      errors.clearQueue();
> >       }
> >
> > -    try (ErrorLogMuter errors = ErrorLogMuter.substring("must be a
> positive")) {
> > +    try (LogListener errors = LogListener.error().substring("must be a
> positive")) {
> >         assertFailedU(adoc("id", "1", RANK_1, Float.toString(-0.0f)));
> >
> >         assertFailedU(adoc("id", "1", RANK_1, Float.toString(-1f)));
> >
> >         assertFailedU(adoc("id", "1", RANK_1, Float.toString(0.0f)));
> >         assertEquals(3, errors.getCount());
> > +      errors.clearQueue();
> >       }
> >     }
> >
> >
> --
> Uwe Schindler
> Achterdiek 19, D-28357 Bremen
> https://www.thetaphi.de
> eMail:u...@thetaphi.de
>

Reply via email to