Skip to content

Commit

Permalink
feat(core): move on development version of async-iterator
Browse files Browse the repository at this point in the history
work on #9
  • Loading branch information
bsorrentino committed Jul 13, 2024
1 parent 5ebfa76 commit 4d385b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core-jdk8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<dependency>
<groupId>org.bsc.async</groupId>
<artifactId>async-generator-jdk8</artifactId>
<version>1.0.0</version>
<version>2.0.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
12 changes: 6 additions & 6 deletions core-jdk8/src/test/java/org/bsc/langgraph4j/AsyncTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ public Data<String> next() {

it.forEachAsync( result::add ).thenAccept( t -> {
System.out.println( "Finished");
});
}).join();

for (var i : it) {
result.add(i);
System.out.println(i);
}
System.out.println( "Finished");

assertEquals( result.size(), myArray.length );
assertIterableEquals( result, listOf(myArray));
assertEquals(myArray.length, result.size() );
assertIterableEquals( listOf(myArray), result );
}
@Test
public void asyncQueueTest() throws Exception {
Expand All @@ -61,11 +61,11 @@ public void asyncQueueTest() throws Exception {

it.forEachAsync(result::add).thenAccept( (t) -> {
System.out.println( "Finished");
});
}).join();


assertEquals(result.size(), 10);
assertIterableEquals(result, listOf("e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9"));
assertEquals( 10, result.size());
assertIterableEquals(listOf("e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9"), result);

}

Expand Down

0 comments on commit 4d385b9

Please sign in to comment.