Skip to content

Commit

Permalink
Increase maxPerIterationMs in performance tests. Re-enable libraryRef…
Browse files Browse the repository at this point in the history
…erences test.
  • Loading branch information
antvaset committed Feb 2, 2025
1 parent 963dd12 commit 3f78b41
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ open class CqlCompilerException
constructor(
message: String?,
val severity: ErrorSeverity = ErrorSeverity.Error,
@field:Transient
val locator: TrackBack? = null,
@field:Transient val locator: TrackBack? = null,
cause: Throwable? = null
) : RuntimeException(message, cause) {
enum class ErrorSeverity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private const val FP_THIS = "\$this"

/** Created by Bryn on 12/29/2016. */
@Suppress("LargeClass", "TooManyFunctions", "ForbiddenComment", "ReturnCount", "MaxLineLength")
open class LibraryBuilder(
class LibraryBuilder(
@JvmField
val namespaceInfo: NamespaceInfo?, // Note: allowed to be null, implies global namespace
val libraryManager: CommonLibraryManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import kotlin.reflect.cast
* well as the type of matching done to retrieve the element, whether case-sensitive or
* case-insensitive.
*/
// TODO @ExposedCopyVisibility
@ExposedCopyVisibility
data class ResolvedIdentifierContext
private constructor(
private val identifier: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
package org.cqframework.cql.cql2elm

import java.io.*
import java.nio.file.Path
import org.cqframework.cql.cql2elm.model.Version
import org.hl7.elm.r1.VersionedIdentifier
import java.nio.file.Path

// NOTE: This implementation is naive and assumes library file names will always take the form:
// <filename>[-<version>].cql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
package org.cqframework.cql.cql2elm

import java.io.*
import java.nio.file.Path
import kotlinx.io.asSource
import kotlinx.io.buffered
import org.cqframework.cql.cql2elm.model.Version
import org.hl7.cql.model.ModelIdentifier
import org.hl7.cql.model.ModelInfoProvider
import org.hl7.elm_modelinfo.r1.ModelInfo
import org.hl7.elm_modelinfo.r1.serializing.ModelInfoReaderFactory
import java.nio.file.Path

// NOTE: This implementation assumes modelinfo file names will always take the form:
// <modelname>-modelinfo[-<version>].cql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.cqframework.cql.cql2elm

import java.util.*
import org.hl7.elm.r1.VersionedIdentifier
import java.io.InputStream
import org.hl7.elm.r1.VersionedIdentifier

interface LibrarySourceProvider {
fun getLibrarySource(libraryIdentifier: VersionedIdentifier): InputStream?
Expand All @@ -14,7 +14,6 @@ interface LibrarySourceProvider {
if (LibraryContentType.CQL == type) {
return getLibrarySource(libraryIdentifier)
}

return null
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.cqframework.cql.cql2elm

import java.io.InputStream
import java.nio.file.Path
import kotlinx.io.Source
import kotlinx.io.asSource
import kotlinx.io.buffered
import kotlin.collections.ArrayList
import org.hl7.cql.model.NamespaceAware
import org.hl7.cql.model.NamespaceManager
import org.hl7.elm.r1.VersionedIdentifier
import java.io.InputStream
import java.nio.file.Path

/**
* Used by LibraryManager to manage a set of library source providers that resolve library includes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.cqframework.cql.cql2elm

import kotlin.collections.ArrayList
import org.hl7.elm.r1.VersionedIdentifier
import java.io.ByteArrayInputStream
import java.io.InputStream
import kotlin.collections.ArrayList
import org.hl7.elm.r1.VersionedIdentifier

/**
* This class implements the LibrarySourceProvider API, using a set of strings representing CQL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.hl7.elm.r1.IncludeDef;
import org.hl7.elm.r1.VersionedIdentifier;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

class NamespaceTests {
Expand Down Expand Up @@ -91,7 +90,6 @@ void namespaceUriPart() {
/* Ensure base functionality with a defaulted namespace uri */

@Test
@Disabled("This passes when run on its own from the IDE but fails when run as part of the local build")
void libraryReferences() {
CqlTranslator translator = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void mainSuite() throws IOException, UcumException {
VersionedIdentifier libraryId = toElmIdentifier("CqlPerformanceTest", "1");
ZonedDateTime date =
ZonedDateTime.of(2018, 1, 1, 7, 0, 0, 0, TimeZone.getDefault().toZoneId());
runPerformanceTest(libraryId, 1000.0, date);
runPerformanceTest(libraryId, 1500.0, date);
}

// This test is for the runtime errors
Expand Down

0 comments on commit 3f78b41

Please sign in to comment.