Class PlatformsWebServiceTest
java.lang.Object
org.glassfish.jersey.test.JerseyTest
ubic.gemma.rest.util.BaseJerseyTest5
ubic.gemma.rest.util.BaseJerseyIntegrationTest5
ubic.gemma.rest.PlatformsWebServiceTest
- All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidtestAll()voidAsk 4, RNA-seq case.voidvoidvoidAsk 4, microarray case.voidAn unknown type is a 400 naming the accepted values, not a silent fallback to the standard file — a caller asking for bioProcess must not be handed every GO term with nothing in the response to say so.voidThe endpoint served the standard flavour unconditionally until thetypeparameter existed, so the_bioProcess/_noParentsfiles thatcreate()writes on every GO-enabled run were unreachable.voidvoidRegression guard for the{probes}restriction being dropped.voidvoidA userfilter=must narrow the listing.voidwithGenes=truemust set the field on every row, and to an EMPTY list rather than null for a probe with no gene mapping — otherwiseNON_NULLelides it and the client cannot tell "maps to nothing" from "not requested".voidWithout the opt-in the field stays null, so it elides from the wire entirely — the existing default response shape is unchanged for callers that never ask.voidvoidAsk 3: a mergee must be able to NAME its merge target.Methods inherited from class BaseJerseyIntegrationTest5
setUpAuthentication, tearDownSecurityContextMethods inherited from class BaseJerseyTest5
configure, configureClient, getTestContainerFactory, setApplicationContext, setUp, tearDownMethods inherited from class org.glassfish.jersey.test.JerseyTest
client, close, closeIfNotNull, configureDeployment, disable, enable, forceDisable, forceEnable, forceSet, getAsyncTimeoutMultiplier, getBaseUri, getClient, getLastLoggedRecord, getLoggedRecords, getPort, getSslContext, getSslParameters, isEnabled, set, set, setClient, target, target
-
Constructor Details
-
PlatformsWebServiceTest
public PlatformsWebServiceTest()
-
-
Method Details
-
setUpMocks
@BeforeEach public void setUpMocks() -
removeFixtures
@AfterEach public void removeFixtures() -
testAll
@Test public void testAll() -
testPlatformDatasets
@Test public void testPlatformDatasets() -
testPlatformElements
@Test public void testPlatformElements() -
testPlatformVoNamesItsMergeTargetAndItsMergees
@Test public void testPlatformVoNamesItsMergeTargetAndItsMergees()Ask 3: a mergee must be able to NAME its merge target.isMergeesaid only THAT a merge happened, andmergees.idis not a filterable property, so from the mergee's side — the side a visitor stands on — the target was unreachable. -
testMicroarrayGeneCountsAreNullWithoutAReport
@Test public void testMicroarrayGeneCountsAreNullWithoutAReport()Ask 4, microarray case. The counts come from the on-disk report, which is written by the pipeline / the monthly job — never computed per request, because counting distinct genes for one large platform measured ~1.7s against production. With no report on disk the fields stay NULL rather than 0: "not computed yet" and "maps to no genes" are different claims, and falling back to the slow query is exactly what this design refuses to do. -
testGeneListPlatformGeneCountsComeFromTheElementCount
@Test public void testGeneListPlatformGeneCountsComeFromTheElementCount()Ask 4, RNA-seq case. A gene-list platform's elements ARE genes, so both counts equal the element count and neither needs a report — which is what makes this path work on a deployment where no reports have been generated yet. -
testPlatformElementRestrictsToTheRequestedProbe
@Test public void testPlatformElementRestrictsToTheRequestedProbe()Regression guard for the{probes}restriction being dropped.CompositeSequenceArrayArg.getPlatformFilter()encodes onlyarrayDesign.id = ?; until 2026-08-22 the endpoint composed that alone, so asking for ONE probe by name returned the platform's first page instead. The bug was invisible to the existing tests because they all mock the arg-service — this one goes through real persistence and asserts on identity, which is the only thing that can catch it. -
testPlatformElementsWithGenesYieldsEmptyListNotNull
@Test public void testPlatformElementsWithGenesYieldsEmptyListNotNull()withGenes=truemust set the field on every row, and to an EMPTY list rather than null for a probe with no gene mapping — otherwiseNON_NULLelides it and the client cannot tell "maps to nothing" from "not requested". The seeded fixture has no GENE2CS rows, so this pins the empty-not-null half specifically. -
testPlatformElementsWithoutGenesLeavesFieldNull
@Test public void testPlatformElementsWithoutGenesLeavesFieldNull()Without the opt-in the field stays null, so it elides from the wire entirely — the existing default response shape is unchanged for callers that never ask. -
testPlatformElementsHonoursNameFilter
@Test public void testPlatformElementsHonoursNameFilter()A userfilter=must narrow the listing. Pinned because the endpoint accepted no filter at all until 2026-08-22 — an unknown query param is silently ignored by JAX-RS, so the UI's search box appeared to run and matched everything. -
testPlatformElementsWithSequence
@Test public void testPlatformElementsWithSequence() -
testGetBlacklistedPlatforms
@Test public void testGetBlacklistedPlatforms() -
testGetBlacklistedPlatformsAsNonAdmin
@Test public void testGetBlacklistedPlatformsAsNonAdmin() -
testPlatformAnnotationsServesEachFileType
The endpoint served the standard flavour unconditionally until thetypeparameter existed, so the_bioProcess/_noParentsfiles thatcreate()writes on every GO-enabled run were unreachable. Each type must now resolve to its own file.Files are planted on disk so the miss path never fires: generation needs GO loaded, which this context does not have, and the point here is the file-name resolution, not the generator.
- Throws:
IOException
-
testPlatformAnnotationsRejectsAnUnknownFileType
@Test public void testPlatformAnnotationsRejectsAnUnknownFileType()An unknown type is a 400 naming the accepted values, not a silent fallback to the standard file — a caller asking for bioProcess must not be handed every GO term with nothing in the response to say so. Rejected before the platform is even looked up.
-