mthmulders / mcs

Search the Maven Central Repository from your command line!

Home Page:https://maarten.mulders.it/projects/mcs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error: TabularOutputPrinterTest.should_mention_number_of_results:98

somera opened this issue · comments

commented

I get compile error

[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   TabularOutputPrinterTest.should_mention_number_of_results:98
Expecting actual:
  "Found 1 results

  Coordinates                        Last updated
  ===========                        ============
  org.codehaus.plexus:plexus-utils   27 Aug. 2021 at 02:08 (MESZ)

"
to contain:
  "Found 1 results"
[INFO]
[ERROR] Tests run: 81, Failures: 1, Errors: 0, Skipped: 0

on main branch and v0.3.4 tag. with

$ java --version
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode, sharing)

This is a very strange test failure, @somera. As you can see from the output you have supplied, the actual output does contain the expected text ("Found 1 results"). I'm using the exact same version of Java and I'm not seeing such test failures.

Can you provide some more detail, such as:

  1. Which operating system and version are you using?
  2. What is the exact command you use to invoke Maven?
  3. What version of Maven are you using?
  4. Is it consistently failing, or randomly?
commented

This is a very strange test failure, @somera. As you can see from the output you have supplied, the actual output does contain the expected text ("Found 1 results"). I'm using the exact same version of Java and I'm not seeing such test failures.

Can you provide some more detail, such as:

  1. Which operating system and version are you using?

Windows 10

On Ubuntu it works fine.

  1. What is the exact command you use to invoke Maven?

mvn clean install

  1. What version of Maven are you using?
$ mvn --version
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: D:\bin\apache\apache-maven-3.9.1
Java version: 17.0.7, vendor: Eclipse Adoptium, runtime: D:\bin\Java\jdk-17.0.7+7
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
  1. Is it consistently failing, or randomly?

consistently

Thanks for your detailed answers, @somera.

The only difference is the operating system, as you are using Windows while I am using macOS on my primary machine. But there's a CI job running on Microsoft Windows Server 2022 where the test case does not fail.

I hope you can debug why it is failing, as I can't reproduce the problem and it's also not failing on any of my other machines (Ubuntu 23.04 or Windows 10).

commented

I will take a look in the next days.

commented

Looks strange, cause tha value of

        var table = buffer.toString();
        assertThat(table).contains("Found 1 results");

is

image

It should work.

commented

But it works with

        var table = buffer.toString();
        assertThat(table).contains("org.codehaus.plexus:plexus-utils");

I don't know why it's not working with Found 1 results