Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schema/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@
<echo message=" Running tests" />
<exec executable="utplsql" resultproperty="utreturn">
<arg value="run"/>
<arg value="-p=${oracle.cwms.user}.test_cwms_rating,${oracle.cwms.user}.test_cwms_text,${oracle.cwms.user}.test_lrts_updates,${oracle.cwms.user}.test_probability_parameter,${oracle.cwms.user}.test_cwms_loc,${oracle.cwms.user}.test_cwms_ts,${oracle.cwms.user}.test_cwms_util,${oracle.cwms.user}.test_cwms_err,${oracle.cwms.user}.test_versioned_time_series,${oracle.cwms.user}.test_update_ts_extents,${oracle.cwms.user}.test_cwms_pool,${oracle.cwms.user}.test_timeseries_snapping,${oracle.cwms.user}.test_cwms_cat,${oracle.cwms.user}.test_cwms_msg,${oracle.cwms.user}.test_cwms_level,${oracle.cwms.user}.test_cwms_water_supply,${oracle.cwms.user}.test_cwms_display,${oracle.cwms.user}.test_cwms_data_dissem,${oracle.cwms.user}.test_cwms_stream,${oracle.cwms.user}.test_cwms_forecast,${oracle.cwms.user}.test_cwms_xchg,${oracle.cwms.user}.test_cwms_cache"/>
<arg value="-p=${oracle.cwms.user}.test_cwms_rating,${oracle.cwms.user}.test_cwms_text,${oracle.cwms.user}.test_lrts_updates,${oracle.cwms.user}.test_probability_parameter,${oracle.cwms.user}.test_cwms_loc,${oracle.cwms.user}.test_cwms_ts,${oracle.cwms.user}.test_cwms_util,${oracle.cwms.user}.test_cwms_err,${oracle.cwms.user}.test_versioned_time_series,${oracle.cwms.user}.test_update_ts_extents,${oracle.cwms.user}.test_cwms_pool,${oracle.cwms.user}.test_timeseries_snapping,${oracle.cwms.user}.test_cwms_cat,${oracle.cwms.user}.test_cwms_msg,${oracle.cwms.user}.test_cwms_level,${oracle.cwms.user}.test_cwms_water_supply,${oracle.cwms.user}.test_cwms_display,${oracle.cwms.user}.test_cwms_data_dissem,${oracle.cwms.user}.test_cwms_stream,${oracle.cwms.user}.test_cwms_fcst,${oracle.cwms.user}.test_cwms_forecast,${oracle.cwms.user}.test_cwms_xchg,${oracle.cwms.user}.test_cwms_cache"/>
<arg value="-f"/><arg value="UT_COVERAGE_HTML_REPORTER"/><arg value="-o"/><arg value="${coverage.dir}/index.html" />
<arg value="-f"/><arg value="UT_COVERAGE_COBERTURA_REPORTER"/><arg value="-o"/><arg value="${coverage.dir}/coverage_pd.xml" />
<arg value="-f"/><arg value="UT_JUNIT_REPORTER"/><arg value="-o"/><arg value="build/tests_pd.xml" />
Expand Down
6 changes: 5 additions & 1 deletion schema/src/cwms/cwms_fcst_pkg_body.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ begin
fs.fcst_spec_code = p_fcst_spec_code
and o.office_code = fs.office_code;
cwms_err.raise(
'ITEM_DOES_NOT_EXISTS',
'ITEM_DOES_NOT_EXIST',
'Forecast instance',
l_office_id||'/'||l_fcst_spec_id||'/'||l_fcst_designator
||'/'||to_char(p_fcst_time_utc, 'yyyy-mm-dd"T"hh24:mi:ss"Z"')
Expand Down Expand Up @@ -526,6 +526,10 @@ begin
||'/'||to_char(l_fcst_time_utc, 'yyyy-mm-dd"T"hh24:mi:ss"Z"')
||'/'||to_char(l_issue_time_utc, 'yyyy-mm-dd"T"hh24:mi:ss"Z"'));
end if;
select *
into l_fcst_inst_rec
from at_fcst_inst
where fcst_inst_code = l_fcst_inst_code;
end if;
-------------------------------------
-- populate instance record fields --
Expand Down
38 changes: 35 additions & 3 deletions schema/src/test/test_cwms_fcst.sql
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ is
l_fcst_info varchar2(32767);
l_client_userid varchar2(100);
l_file_contents clob;
l_file_description cwms_t_blob_file.description%type;
l_file_description at_fcst_spec.description%type;
l_blob_file cwms_t_blob_file;
l_fcst_date_utc date := cwms_util.change_timezone(c_fcst_date, c_time_zone_id, 'UTC');
l_issue_date_utc date := cwms_util.change_timezone(c_issue_date, c_time_zone_id, 'UTC');
Expand Down Expand Up @@ -574,11 +574,43 @@ begin
p_fail_if_exists => 'F',
p_ignore_nulls => 'T',
p_office_id => c_office_id);
----------------
-- store inst --
----------------
cwms_fcst.store_fcst(
p_fcst_spec_id => c_fcst_spec_id,
p_fcst_designator => c_fcst_designator,
p_forecast_date_time => c_fcst_date,
p_issue_date_time => c_issue_date,
p_time_zone => c_time_zone_id,
p_max_age => c_max_age,
p_notes => c_fcst_notes,
p_fcst_info => null,
p_fcst_file => null,
p_fail_if_exists => 'T' ,
p_ignore_nulls => 'T' ,
p_office_id => c_office_id);
----------------
-- store inst again with no changes from original store other than not failing if exists--
----------------
cwms_fcst.store_fcst(
p_fcst_spec_id => c_fcst_spec_id,
p_fcst_designator => c_fcst_designator,
p_forecast_date_time => c_fcst_date,
p_issue_date_time => c_issue_date,
p_time_zone => c_time_zone_id,
p_max_age => c_max_age,
p_notes => c_fcst_notes,
p_fcst_info => null,
p_fcst_file => null,
p_fail_if_exists => 'F' ,
p_ignore_nulls => 'T' ,
p_office_id => c_office_id);
dbms_lob.createtemporary(l_file_contents, true);
for rec in (select text from user_source where name = 'CWMS_FCST' and type = 'PACKAGE' order by line) loop
l_file_contents := l_file_contents || rec.text;
end loop;
l_file_description := "The text of the CWMS_FCST package specification";
l_file_description := 'The text of the CWMS_FCST package specification';
for has_info in 0..1 loop
---------------------------
-- set the forecast info --
Expand Down Expand Up @@ -627,7 +659,7 @@ begin
p_notes => c_fcst_notes,
p_fcst_info => l_fcst_info,
p_fcst_file => l_blob_file,
p_fail_if_exists => 'T' ,
p_fail_if_exists => 'F' ,
p_ignore_nulls => 'F' ,
p_office_id => c_office_id);
-----------------------------------------------
Expand Down
Loading