Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
fbe0388
Moving to build with Java 21
scottf Nov 4, 2025
be0920a
Merge branch 'refs/heads/main' into twoone
scottf Nov 7, 2025
e704148
tuning test execution
scottf Nov 8, 2025
17405b0
Merge branch 'main' into twoone
scottf Nov 10, 2025
0cb6de1
Merge branch 'main' into twoone
scottf Nov 10, 2025
4fac32b
Merge branch 'main' into twoone
scottf Nov 10, 2025
a011b04
Merge branch 'main' into twoone
scottf Nov 19, 2025
9c1b198
Work in progress
scottf Nov 19, 2025
d1ea9e3
Merge branch 'main' into twoone
scottf Nov 19, 2025
8c97c4f
Work in progress
scottf Nov 20, 2025
fa32af0
Fix removed Automatic-Module-Name
scottf Nov 20, 2025
d608777
Merge branch 'main' into twoone
scottf Nov 20, 2025
976f044
Resuing options builder to share executors making as few threads / po…
scottf Nov 20, 2025
a8dc40c
Resuing long running server as much as possible
scottf Nov 21, 2025
4de8a70
Resuing long running server as much as possible
scottf Nov 21, 2025
f6baf7f
Reusing long running when possible
scottf Nov 23, 2025
570daef
Reusing long running when possible
scottf Nov 23, 2025
5690337
improving options hopefully to support more parallel connections
scottf Nov 23, 2025
d122fe8
Adding flexibility for executor options
scottf Nov 23, 2025
8a3d892
putting options test back
scottf Nov 23, 2025
e94dd11
putting options test back
scottf Nov 24, 2025
1e19ab1
Merge branch 'main' into twoone
scottf Nov 24, 2025
e4e3ca6
more
scottf Nov 24, 2025
0f5ca97
Merge branch 'main' into twoone
scottf Nov 25, 2025
43f568d
more
scottf Nov 27, 2025
d428830
Merge branch 'main' into twoone
scottf Nov 28, 2025
45ced7b
fix test after merge
scottf Nov 28, 2025
8eceedd
timing is everything
scottf Nov 28, 2025
d11b2bf
timing is everything
scottf Nov 28, 2025
caf4e79
timing is everything
scottf Nov 28, 2025
9067d32
fixing flappers with futures
scottf Nov 29, 2025
a8d9ec5
on and on and on
scottf Nov 29, 2025
46f1c6a
worked some disabled into enabled
scottf Nov 30, 2025
4d5becf
worked some disabled into enabled
scottf Nov 30, 2025
4ee828b
worked some disabled into enabled
scottf Dec 1, 2025
0f0a8d2
reusing servers needed the same conf
scottf Dec 1, 2025
04fcd08
more refactoring
scottf Dec 2, 2025
1ba8e12
ListenerForTesting refactoring
scottf Dec 3, 2025
4e91f5f
This should not be failing
scottf Dec 3, 2025
f85fa15
This should not be failing
scottf Dec 3, 2025
7987829
keep on digging
scottf Dec 3, 2025
d03c8e0
Replaced old listener test harness
scottf Dec 4, 2025
b2abd2c
Merge branch 'main' into twoone
scottf Dec 5, 2025
805cd10
Merge branch 'main' into twoone
scottf Dec 5, 2025
c4cd4ec
fix after merge
scottf Dec 5, 2025
48cd331
fix after merge
scottf Dec 5, 2025
0ffbfba
almost done
scottf Dec 5, 2025
ba61b94
there are no accidents
scottf Dec 5, 2025
73b0717
WebsocketConnectTests cleanup
scottf Dec 5, 2025
cabd89d
resuing more
scottf Dec 7, 2025
5b66c00
RC1
scottf Dec 7, 2025
b98d0b1
RC2
scottf Dec 7, 2025
f99fdc1
need to pull the server runner snapshot
scottf Dec 7, 2025
fdf1e96
Merge branch 'main' into twoone
scottf Dec 8, 2025
866634d
revert this change wasn't needed
scottf Dec 8, 2025
06d9b81
Merge branch 'main' into twoone
scottf Dec 8, 2025
1c6bd6a
remove readme change, will be fixed elsewhere
scottf Dec 9, 2025
1d96756
clean up all ide warnings
scottf Dec 9, 2025
b3b6f16
try to fix Authorization Violation test flappers
scottf Dec 10, 2025
d5f596c
I think I finally unflapped testRealUserAuthenticationExpired
scottf Dec 10, 2025
538d485
NatsServerProtocolMock
scottf Dec 10, 2025
3d6f2e7
NatsServerProtocolMock use case tuning
scottf Dec 10, 2025
6edd8c0
fixing flappers
scottf Dec 10, 2025
6921303
Merge branch 'main' into twoone
scottf Dec 11, 2025
85e12a7
Merge branch 'main' into twoone
scottf Dec 16, 2025
66a0cda
testSocketDataPortTimeout
scottf Dec 16, 2025
7c097e8
flappers are always a timing issue exacerbated by GH actions instance…
scottf Dec 16, 2025
6fb0269
Merge branch 'main' into twoone
scottf Dec 16, 2025
52ebb1b
Merge branch 'main' into twoone
scottf Dec 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/branch-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
steps:
- name: Setup JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '8'
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: Build and Test
run: chmod +x gradlew && ./gradlew clean test jacocoTestReport
run: chmod +x gradlew && ./gradlew clean test jacocoTestReport --refresh-dependencies
- name: Verify Javadoc
run: ./gradlew javadoc
- name: Send coverage to Coveralls
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
Expand Down
44 changes: 36 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,40 @@ plugins {
id("java-library")
id("maven-publish")
id("jacoco")
id("biz.aQute.bnd.builder") version "5.1.2"
// id("biz.aQute.bnd.builder") version "5.1.2"
id("biz.aQute.bnd.builder") version "7.1.0"
id("org.gradle.test-retry") version "1.6.4"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("signing")
}

def jarVersion = "2.24.2"
group = 'io.nats'

def isRelease = System.getenv("BUILD_EVENT") == "release"
def brn = System.getenv("BRANCH_REF_NAME")
def snap = brn == null || brn.equals("") ? "-SNAPSHOT" : "." + brn + "-SNAPSHOT"

group = 'io.nats'
def tc = System.getenv("TARGET_COMPATIBILITY");
def targetCompat = tc == "21" ? JavaVersion.VERSION_21 : (tc == "17" ? JavaVersion.VERSION_17 : JavaVersion.VERSION_1_8)
def jarEnd = tc == "21" ? "-jdk21" : (tc == "17" ? "-jdk17" : "")
def jarAndArtifactName = "jnats" + jarEnd

version = isRelease ? jarVersion : jarVersion + snap // version is the variable the build actually uses.

def os = System.getProperty("os.name")
def isNotWindows = !os.contains("Windows")
def javaVersion = System.getProperty("java.version");
def compilerIsJava8 = javaVersion.startsWith("1.8")

System.out.println("OS: " + os)
System.out.println("Java: " + javaVersion)
System.out.println("Target Compatibility: " + targetCompat)
System.out.println("Output: " + group + ":" + jarAndArtifactName + ":" + version)

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = targetCompat
}

repositories {
Expand All @@ -37,8 +53,13 @@ dependencies {
implementation 'org.jspecify:jspecify:1.0.0'

testImplementation 'org.junit.jupiter:junit-jupiter:5.14.1'
testImplementation 'io.nats:jnats-server-runner:3.0.1'
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.12.3'
testImplementation 'io.nats:jnats-server-runner:3.0.2-SNAPSHOT'
if (compilerIsJava8) {
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.12.3'
}
else {
testImplementation 'nl.jqno.equalsverifier:equalsverifier:4.2.2'
}

testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
Expand Down Expand Up @@ -72,6 +93,7 @@ jar {
"Bundle-DocURL": "https://github.com/nats-io/nats.java"
)
}
archiveBaseName = jarAndArtifactName
}

test {
Expand All @@ -87,7 +109,13 @@ test {
maxFailures = 4
maxRetries = 4
}
maxParallelForks = Runtime.runtime.availableProcessors()
int mpf = Math.max(1, (int)(Runtime.runtime.availableProcessors() * 3 / 4))
if (compilerIsJava8 || isNotWindows) {
maxParallelForks = Math.min(6, mpf)
}
else {
maxParallelForks = Math.min(3, mpf);
}
systemProperty 'junit.jupiter.execution.timeout.default', '3m'
}

Expand Down Expand Up @@ -198,10 +226,10 @@ publishing {
artifact javadocJar
artifact testsJar
pom {
name = "jnats"
name = jarAndArtifactName
packaging = "jar"
groupId = group
artifactId = "jnats"
artifactId = jarAndArtifactName
description = 'Client library for working with the NATS messaging system.'
url = 'https://github.com/nats-io/nats.java'
licenses {
Expand Down
12 changes: 12 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
commons-math3 = "3.6.1"
guava = "33.4.5-jre"
junit-jupiter = "5.12.1"

[libraries]
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
9 changes: 7 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://plugins.gradle.org/m2/" }
maven { url="https://repo1.maven.org/maven2/" }
maven { url="https://central.sonatype.com/repository/maven-snapshots/" }
maven { url="https://plugins.gradle.org/m2/" }
}
plugins {
id("biz.aQute.bnd.builder") version "7.1.0"
}
}
rootProject.name = 'java-nats'
Loading
Loading