Task Summary
FulltextSearchQueryUtilsSpec is the only spec in amber/src/main/scala/org/apache/texera/web/resource/dashboard/. It also demonstrates that this tier does not need a database to test: a dialect-only DSL.using(SQLDialect.POSTGRES) context renders jOOQ Condition/Field objects with no connection, and ctx.newRecord(...) builds records purely in memory.
Three members of the tier are connection-free and untested:
DashboardResource.getOrderFields (22 missed lines in the file) — public and pure. It regex-matches orderBy against (Name|CreateTime|EditTime|ExecutionTime)(Asc|Desc). Existing coverage is only incidental, via WorkflowResourceSpec, and reaches NameAsc/NameDesc, ExecutionTimeAsc/Desc and EditTime through the default. CreateTimeAsc/CreateTimeDesc and the non-matching fall-through are unreached. The asc/desc asymmetry is also worth pinning: Desc emits desc nulls last while Asc emits a bare asc, and that asymmetry is what makes the observable behaviour symmetric, since Postgres defaults to NULLS LAST for ASC and NULLS FIRST for DESC. Separately, searchAllResources with an unrecognised resourceType throws IllegalArgumentException before any query is constructed, so that path needs no database either.
WorkflowSearchQueryBuilder.toEntryImpl and mappedResourceSchema (7 missed) — reachable because this object drops the trait's protected, unlike DatasetSearchQueryBuilder whose five members are all override protected (Scala protected grants no same-package access, so those are not callable from a spec). toEntryImpl is pure record-to-DTO mapping: the projects aggregate is looked up by structural jOOQ Field equality, the comma-joined value is split into Integers, a NULL privilege degrades to NONE, and an ownership flag compares uids.
UnifiedResourceSchema.apply (5 missed) — 24 default-argument Fields, plus a keep-first de-duplication behind allFields that collapses repeated originals.
translateRecord, resultsOwnersInfo, searchAllPublicResourceCall, constructQuery and every fetch path route through SqlServer.getInstance().createDSLContext() and are out of scope for a no-DB spec.
Note for whoever picks this up: FulltextSearchQueryUtils.usePgroonga is a JVM-global var that DatasetResourceSpec and WorkflowResourceSpec both set to false in beforeAll and never restore, and amber's suites run concurrently in one JVM. New specs here should neither depend on its default nor mutate it.
Task Type
Task Summary
FulltextSearchQueryUtilsSpecis the only spec inamber/src/main/scala/org/apache/texera/web/resource/dashboard/. It also demonstrates that this tier does not need a database to test: a dialect-onlyDSL.using(SQLDialect.POSTGRES)context renders jOOQCondition/Fieldobjects with no connection, andctx.newRecord(...)builds records purely in memory.Three members of the tier are connection-free and untested:
DashboardResource.getOrderFields(22 missed lines in the file) — public and pure. It regex-matchesorderByagainst(Name|CreateTime|EditTime|ExecutionTime)(Asc|Desc). Existing coverage is only incidental, viaWorkflowResourceSpec, and reachesNameAsc/NameDesc,ExecutionTimeAsc/DescandEditTimethrough the default.CreateTimeAsc/CreateTimeDescand the non-matching fall-through are unreached. The asc/desc asymmetry is also worth pinning:Descemitsdesc nulls lastwhileAscemits a bareasc, and that asymmetry is what makes the observable behaviour symmetric, since Postgres defaults to NULLS LAST for ASC and NULLS FIRST for DESC. Separately,searchAllResourceswith an unrecognisedresourceTypethrowsIllegalArgumentExceptionbefore any query is constructed, so that path needs no database either.WorkflowSearchQueryBuilder.toEntryImplandmappedResourceSchema(7 missed) — reachable because this object drops the trait'sprotected, unlikeDatasetSearchQueryBuilderwhose five members are alloverride protected(Scalaprotectedgrants no same-package access, so those are not callable from a spec).toEntryImplis pure record-to-DTO mapping: the projects aggregate is looked up by structural jOOQFieldequality, the comma-joined value is split intoIntegers, a NULL privilege degrades toNONE, and an ownership flag compares uids.UnifiedResourceSchema.apply(5 missed) — 24 default-argumentFields, plus a keep-first de-duplication behindallFieldsthat collapses repeated originals.translateRecord,resultsOwnersInfo,searchAllPublicResourceCall,constructQueryand every fetch path route throughSqlServer.getInstance().createDSLContext()and are out of scope for a no-DB spec.Note for whoever picks this up:
FulltextSearchQueryUtils.usePgroongais a JVM-globalvarthatDatasetResourceSpecandWorkflowResourceSpecboth set tofalseinbeforeAlland never restore, and amber's suites run concurrently in one JVM. New specs here should neither depend on its default nor mutate it.Task Type