File: channel.test

package info (click to toggle)
libapache2-mod-rivet 3.2.6-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,384 kB
  • sloc: tcl: 8,982; xml: 8,619; ansic: 7,074; sh: 5,039; makefile: 195; sql: 91; lisp: 78
file content (29 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# checking the channel management

foreach {sep_channel offset_value} {On 0 Off 1} {

    ::tcltest::test channel-1.1 [list checking SeparateChannel] {
        apachetest::start {} "
        RivetServerConf SeparateVirtualInterps  On
        RivetServerConf SeparateChannels        $sep_channel
        #NameVirtualHost 127.0.0.1
        <VirtualHost *>
            ServerName vhost1
            RivetServerConf ChildInitScript \"fconfigure stdout -buffersize 8192\"
        </VirtualHost>

        <VirtualHost *>
            ServerName vhost2
            RivetServerConf ChildInitScript \"fconfigure stdout -buffersize 16384\"
        </VirtualHost>
        " {
            set page1 [::http::geturl "${urlbase}channel.tcl" -headers [list Host vhost1]]
            set page2 [::http::geturl "${urlbase}channel.tcl" -headers [list Host vhost2]]

            puts "[::http::data $page1] [::http::data $page2]"
            set diff [expr ([::http::data $page2]-[::http::data $page1] != 0) + $offset_value]
        }
        set diff
    } {1}

}