Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Java baseline to Java 17 and migrate starter to Spring Boot 3 #376

Open
2 of 3 tasks
mfvanek opened this issue Apr 27, 2024 · 3 comments
Open
2 of 3 tasks
Labels
breaking change Pull requests that breaks backward compatibility enhancement New feature or request
Milestone

Comments

@mfvanek
Copy link
Owner

mfvanek commented Apr 27, 2024

@mfvanek mfvanek added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers breaking change Pull requests that breaks backward compatibility labels Apr 27, 2024
@mfvanek mfvanek removed help wanted Extra attention is needed good first issue Good for newcomers labels May 4, 2024
@mfvanek
Copy link
Owner Author

mfvanek commented Oct 12, 2024

We are going to single test like:

    @Autowired
    private List<DatabaseCheckOnHost<? extends DbObject>> checks;

    @Test
    void checksShouldWork() {
        assertThat(checks)
            .hasSameSizeAs(Diagnostic.values());
        checks.forEach(c -> assertThat(c.check()).isEmpty());
        checks.forEach(c ->
            switch (c.getDiagnostic()) {
                case BLOATED_TABLES:
                    assertThat(c.check())
                        .hasSize(1)
                        .containsExactlyInAnyOrder(
                            IndexWithBloat.of("t", "i", 0L, 0L, 0L)
                        );
                    break;
                case INVALID_INDEXES:
                    assertThat(c.check())
                        .hasSize(0);
                    break;
                default:
                    assertThat(c.check()).isEmpty();
            }
        );
    }

@mfvanek
Copy link
Owner Author

mfvanek commented Oct 12, 2024

See assertj/assertj#772

    @SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
    @Test
    void shouldWorkForPublicSchema() {
        checks.forEach(c -> {
            final List<? extends DbObject> checkResult = c.check();
            switch (c.getDiagnostic()) {
                case TABLES_WITHOUT_PRIMARY_KEY, TABLES_WITHOUT_DESCRIPTION -> assertThat(checkResult)
                    .asInstanceOf(list(Table.class))
                    .hasSize(1)
                    // HOW TO FIX: just add liquibase table to exclusions
                    .containsExactly(Table.of("databasechangelog", 0L));

                default -> assertThat(checkResult).isEmpty();
            }
        });
    }

@mfvanek mfvanek added this to the 0.14.0 milestone Oct 13, 2024
@mfvanek
Copy link
Owner Author

mfvanek commented Nov 8, 2024

@mfvanek mfvanek modified the milestones: 0.14.0, 0.20.0 Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Pull requests that breaks backward compatibility enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant