Skip to content

NO-SNOW: Add minicore initialization test#2503

Merged
sfc-gh-dheyman merged 4 commits intomasterfrom
minicore-init-test
Feb 16, 2026
Merged

NO-SNOW: Add minicore initialization test#2503
sfc-gh-dheyman merged 4 commits intomasterfrom
minicore-init-test

Conversation

@sfc-gh-dheyman
Copy link
Collaborator

@sfc-gh-dheyman sfc-gh-dheyman commented Feb 16, 2026

Overview

Add test verifying that DriverInitializer.initialize() triggers minicore async initialization. This would have caught the regression fixed in a07520c, where the Minicore.initializeAsync() call was accidentally dropped during the public API restructuring. Also adds Minicore.isInitializationStarted() and DriverInitializer.resetForTesting() to support the test cleanly.

Pre-review self checklist

  • PR branch is updated with all the changes from master branch
  • The code is correctly formatted (run mvn -P check-style validate)
  • New public API is not unnecessary exposed (run mvn verify and inspect target/japicmp/japicmp.html)
  • The pull request name is prefixed with SNOW-XXXX:
  • Code is in compliance with internal logging requirements

External contributors - please answer these questions before submitting a pull request. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Issue: #NNNN

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency or upgrading an existing one
    • I am adding new public/protected component not marked with @SnowflakeJdbcInternalApi (note that public/protected methods/fields in classes marked with this annotation are already internal)
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a regression test to verify that DriverInitializer.initialize() correctly triggers Minicore.initializeAsync(). The test would have caught a bug where the async initialization call was accidentally dropped during API restructuring (commit a07520c). To support this test, the PR introduces Minicore.hasInitializationStarted() to check if initialization has begun, and DriverInitializer.resetForTesting() to enable proper test state cleanup.

Changes:

  • Added test verifying DriverInitializer triggers Minicore initialization
  • Added Minicore.hasInitializationStarted() method to query initialization state
  • Added DriverInitializer.resetForTesting() method for test isolation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/test/java/net/snowflake/client/internal/driver/DriverInitializerTest.java New test class verifying DriverInitializer.initialize() triggers Minicore async initialization
src/main/java/net/snowflake/client/internal/driver/DriverInitializer.java Added resetForTesting() method to reset initialization state for testing
src/main/java/net/snowflake/client/internal/core/minicore/Minicore.java Added hasInitializationStarted() method to check if async initialization has been triggered

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

sfc-gh-dheyman and others added 2 commits February 16, 2026 14:07
…core.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…alizer.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sfc-gh-dheyman sfc-gh-dheyman enabled auto-merge (squash) February 16, 2026 14:59
@sfc-gh-dheyman sfc-gh-dheyman merged commit cd7288b into master Feb 16, 2026
156 of 163 checks passed
@sfc-gh-dheyman sfc-gh-dheyman deleted the minicore-init-test branch February 16, 2026 16:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments