Skip to content

Commit

Permalink
fix: Pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
SaadEGI committed Aug 15, 2023
1 parent a53052e commit bbb34fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,15 @@ void setUp(EdcExtension extension) {

@Test
void contractDefinitionPage(ContractDefinitionService contractDefinitionService) {
//arrange
// arrange
var client = TestUtils.edcClient();
var criterion = new Criterion("exampleLeft1", "EQ", "abc");
createContractDefinition(contractDefinitionService, "contractPolicy-id-1", "accessPolicy-id-1", criterion);

// act
var result = client.uiApi().contractDefinitionPage();


//assert
// assert
var contractDefinitions = result.getContractDefinitions();
assertThat(contractDefinitions).hasSize(1);
var contractDefinition = contractDefinitions.get(0);
Expand All @@ -68,6 +67,7 @@ void contractDefinitionPageSorting(ContractDefinitionService contractDefinitionS
"contractPolicy-id-1",
"accessPolicy-id-1",
new Criterion("exampleLeft1", "EQ", "abc"));
TestUtils.wait(1);
createContractDefinition(
contractDefinitionService,
"contractPolicy-id-2",
Expand Down Expand Up @@ -106,7 +106,7 @@ void testContractDefinitionCreation(ContractDefinitionService contractDefinition
// act
var response = client.uiApi().createContractDefinition(contractDefinition);

//assert
// assert
assertThat(response).isNotNull();
var contractDefinitions = contractDefinitionService.query(QuerySpec.max()).getContent().toList();
assertThat(contractDefinitions).hasSize(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,12 @@ public static EdcClient edcClient() {
.managementApiKey(TestUtils.MANAGEMENT_API_KEY)
.build();
}

public static void wait(int seconds) {
try {
Thread.sleep(seconds * 1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}

0 comments on commit bbb34fa

Please sign in to comment.