Skip to content

Commit 0b8592e

Browse files
committed
test(dataframe): cover new methods in lifecycle tests
1 parent 3dcf794 commit 0b8592e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/test/java/org/apache/datafusion/DataFrameTransformationsTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ void methodsThrowAfterClose() {
128128
df.close();
129129
assertThrows(IllegalStateException.class, () -> df.select("x"));
130130
assertThrows(IllegalStateException.class, () -> df.filter("x > 0"));
131+
assertThrows(IllegalStateException.class, () -> df.limit(1));
132+
assertThrows(IllegalStateException.class, () -> df.limit(0, 1));
133+
assertThrows(IllegalStateException.class, df::distinct);
134+
assertThrows(IllegalStateException.class, () -> df.dropColumns("x"));
135+
assertThrows(IllegalStateException.class, () -> df.withColumnRenamed("x", "y"));
131136
assertThrows(IllegalStateException.class, df::count);
132137
assertThrows(IllegalStateException.class, df::show);
133138
assertThrows(IllegalStateException.class, () -> df.show(5));
@@ -144,6 +149,11 @@ void methodsThrowAfterCollect() throws Exception {
144149
}
145150
assertThrows(IllegalStateException.class, () -> df.select("x"));
146151
assertThrows(IllegalStateException.class, () -> df.filter("x > 0"));
152+
assertThrows(IllegalStateException.class, () -> df.limit(1));
153+
assertThrows(IllegalStateException.class, () -> df.limit(0, 1));
154+
assertThrows(IllegalStateException.class, df::distinct);
155+
assertThrows(IllegalStateException.class, () -> df.dropColumns("x"));
156+
assertThrows(IllegalStateException.class, () -> df.withColumnRenamed("x", "y"));
147157
assertThrows(IllegalStateException.class, df::count);
148158
assertThrows(IllegalStateException.class, df::show);
149159
assertThrows(IllegalStateException.class, () -> df.show(5));

0 commit comments

Comments
 (0)