@@ -93,60 +93,12 @@ static void deleteSpec() throws SQLException {
9393 CwmsDataApiSetupCallback .getDatabaseLink ()
9494 .connection (c -> {
9595 try {
96- CWMS_FCST_PACKAGE . call_DELETE_FCST_SPEC ( OracleDSL .using (c ).configuration (), SPEC_ID , "designator" ,
97- DeleteRule . DELETE_ALL . getRule (), OFFICE );
96+ OracleDSL .using (c ).truncateTable ( DSL . table ( "CWMS_20.AT_FCST_SPEC" ))
97+ . execute ( );
9898 } catch (DataAccessException e ) {
9999 LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
100100 }
101- try {
102- CWMS_FCST_PACKAGE .call_DELETE_FCST_SPEC (OracleDSL .using (c ).configuration (), SPEC_ID + "-NULL-DESIGNATOR" , null ,
103- DeleteRule .DELETE_ALL .getRule (), OFFICE );
104- } catch (DataAccessException e ) {
105- LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
106- }
107- try {
108- CWMS_FCST_PACKAGE .call_DELETE_FCST_SPEC (OracleDSL .using (c ).configuration (), SPEC_ID + "-TEST" , "designator" ,
109- DeleteRule .DELETE_ALL .getRule (), OFFICE );
110- } catch (DataAccessException e ) {
111- LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
112- }
113- try {
114- CWMS_FCST_PACKAGE .call_DELETE_FCST_SPEC (OracleDSL .using (c ).configuration (), SPEC_ID + "TEST" , "designator" ,
115- DeleteRule .DELETE_ALL .getRule (), OFFICE );
116- } catch (DataAccessException e ) {
117- LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
118- }
119- try {
120- CWMS_FCST_PACKAGE .call_DELETE_FCST_SPEC (OracleDSL .using (c ).configuration (), SPEC_ID + "TEST-2" , "designator" ,
121- DeleteRule .DELETE_ALL .getRule (), OFFICE );
122- } catch (DataAccessException e ) {
123- LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
124- }
125- try {
126- CWMS_FCST_PACKAGE .call_DELETE_FCST_SPEC (OracleDSL .using (c ).configuration (), SPEC_ID + "-TEST-2" , "designator" ,
127- DeleteRule .DELETE_ALL .getRule (), OFFICE );
128- } catch (DataAccessException e ) {
129- LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
130- }
131- try {
132- CWMS_FCST_PACKAGE .call_DELETE_FCST_SPEC (OracleDSL .using (c ).configuration (), "TEST_SPEC_2" , "designator" ,
133- DeleteRule .DELETE_ALL .getRule (), OFFICE );
134- } catch (DataAccessException e ) {
135- LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
136- }
137- try {
138- CWMS_FCST_PACKAGE .call_DELETE_FCST_SPEC (OracleDSL .using (c ).configuration (), SPEC_ID + "-LRTS" , "designator" ,
139- DeleteRule .DELETE_ALL .getRule (), OFFICE );
140- } catch (DataAccessException e ) {
141- LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
142- }
143- try {
144- CWMS_FCST_PACKAGE .call_DELETE_FCST_SPEC (OracleDSL .using (c ).configuration (), SPEC_ID + "-2" , "designator" ,
145- DeleteRule .DELETE_ALL .getRule (), OFFICE );
146- } catch (DataAccessException e ) {
147- LOGGER .atFine ().withCause (e ).log ("Couldn't clean up forecast spec before executing tests. Probably didn't exist" );
148- }
149- });
101+ }, "CWMS_20" );
150102
151103 }
152104
0 commit comments