AssertJ AssertThat isEqual taking way too long to return

63 Views Asked by At

Platform: IntelliJ IDEA on a mac

Java: openjdk 11.0.20 2023-07-18 LTS OpenJDK Runtime Environment (build 11.0.20+8-LTS) OpenJDK 64-Bit Server VM (build 11.0.20+8-LTS, mixed mode)

AssertJ org.assertj:assertj-core:3.16.1

I've scoured several websites, Baeldung, Project Lombok, and the AssertJ website itself, but I'm non the wiser!

It's very simple: In my java code, I have a stripped down version of one of my tests

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;

@DisplayName("This is just a test of AssertJ")

public class testAssertJ  {

    @Test
    public void assertJTest() {
        assertThat("actualMessage").isEqualTo("actualMessage");
    }
}

When executing this code, it' complete in milliseconds, however when I debug it (putting a breakpoint on the line containing assertThat.) and step over it, then this is where it can take upto 30 seconds to complete!!!

The question is WHY??

0

There are 0 best solutions below