Skip to content

Commit

Permalink
Some testing tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
swaldman committed Jan 26, 2025
1 parent 76beb0e commit 06e87ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ object `package` extends RootModule with JavaModule with PublishModule {

require( sys.props("java.runtime.version").startsWith("11"), s"Bad build JVM: ${sys.props("java.runtime.version")} -- We currently expect to build under Java 11. (We generate Java $JvmCompatVersion compatible source files.)" )

// see https://mill-build.org/mill/depth/sandboxing.html
val BuildRoot = os.Path( sys.env("MILL_WORKSPACE_ROOT") )

// we don't use the newer --release flag, we intentionally compile against newer API, so newer API is supported
Expand Down Expand Up @@ -261,6 +262,9 @@ object `package` extends RootModule with JavaModule with PublishModule {
override def artifactName = T{"c3p0-test"}
override def publishVersion = T{ build.publishVersion() }

// when you want to generate tests you can try under old JVMs
// override def javacOptions = Seq("-source",JvmCompatVersion,"-target",JvmCompatVersion)

/**
* A place for resources we want seen by local (test) runs, but
* should not be published (even locally) into the c3p0-test jar,
Expand Down
1 change: 1 addition & 0 deletions test/conf-logging/logging.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ handlers=java.util.logging.ConsoleHandler
#com.mchange.v2.resourcepool.level=FINER
#.level=INFO
com.mchange.v2.c3p0.impl.level=FINE
#com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.level=FINEST
java.util.logging.ConsoleHandler.level=FINEST
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.SimpleFormatter.format=%1$tF@%1$tT [%4$s] [%3$s] %5$s %6$s%n
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.sql.*;
import java.util.*;
import java.util.concurrent.Executor;
import java.util.logging.Logger;

public class MockConnectionWithBoundaries implements Connection {

Expand All @@ -14,6 +13,7 @@ public void abort(Executor executor) throws SQLException {

public void beginRequest() throws SQLException {
MockDriver.beginRequestCount.getAndIncrement();
System.err.println("MockConnectionWithBoundaries.beginRequest called.");
}

@Override
Expand Down Expand Up @@ -87,8 +87,8 @@ public Struct createStruct(String typeName, Object[] attributes) throws SQLExcep
}

public void endRequest() throws SQLException {

MockDriver.endRequestCount.getAndIncrement();
System.err.println("MockConnectionWithBoundaries.endRequest called.");
}

@Override
Expand Down

0 comments on commit 06e87ad

Please sign in to comment.