BenchmarkQueryResourcesTest.java
/*******************************************************************************
* Copyright (c) 2025 Eclipse RDF4J contributors.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Some portions generated by Codex
package org.eclipse.rdf4j.benchmark.common;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.InputStream;
import org.junit.jupiter.api.Test;
class BenchmarkQueryResourcesTest {
private static final String[] RESOURCE_PATHS = {
"benchmarkFiles/common-themes.qr",
"benchmarkFiles/different-datasets-with-similar-distributions.qr",
"benchmarkFiles/long-chain.qr",
"benchmarkFiles/lots-of-optional.qr",
"benchmarkFiles/mergejoin.qr",
"benchmarkFiles/minus.qr",
"benchmarkFiles/multiple-sub-select.qr",
"benchmarkFiles/nested-optionals.qr",
"benchmarkFiles/optional-lhs-filter.qr",
"benchmarkFiles/optional-lhs-filter-memory.qr",
"benchmarkFiles/optional-rhs-filter.qr",
"benchmarkFiles/optional-rhs-filter-memory.qr",
"benchmarkFiles/ordered-union-limit.qr",
"benchmarkFiles/particularly-large-join-surface.qr",
"benchmarkFiles/query-distinct-predicates.qr",
"benchmarkFiles/query-persons-count-friends-sorted.qr",
"benchmarkFiles/query-persons-count-friends.qr",
"benchmarkFiles/query-persons-friends.qr",
"benchmarkFiles/query1.qr",
"benchmarkFiles/query10.qr",
"benchmarkFiles/query2.1.qr",
"benchmarkFiles/query2.2.qr",
"benchmarkFiles/query2.qr",
"benchmarkFiles/query3.1.qr",
"benchmarkFiles/query3.2.qr",
"benchmarkFiles/query3.qr",
"benchmarkFiles/query4.1.qr",
"benchmarkFiles/query4.2.qr",
"benchmarkFiles/query4.qr",
"benchmarkFiles/query5-elasticsearch.qr",
"benchmarkFiles/query5.qr",
"benchmarkFiles/query6-elasticsearch.qr",
"benchmarkFiles/query6.qr",
"benchmarkFiles/query7-pathexpression1.qr",
"benchmarkFiles/query8-pathexpression2.qr",
"benchmarkFiles/query9.qr",
"benchmarkFiles/simple-filter-not.qr",
"benchmarkFiles/sub-select.qr",
"benchmarkFiles/wild-card-chain-with-common-ends.qr",
"complexBenchmark/transaction1.qr",
"complexBenchmark/transaction2.qr",
"complexBenchmark/transaction3.qr",
"complexBenchmark/transaction4.qr"
};
@Test
void allBenchmarkQueryResourcesAreAvailable() throws Exception {
for (String resourcePath : RESOURCE_PATHS) {
try (InputStream stream = BenchmarkResources.openDecompressedStream(resourcePath)) {
assertNotNull(stream, "Missing resource: " + resourcePath);
}
}
}
}